]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/network.h
lib: fix doc comment of the "cli_show_end" northbound callback
[mirror_frr.git] / lib / network.h
index a6b8ed1e17e966eb1e7696d581bd8825009bc018..a00c5a0a6574ce6122c868c6ba2a773ea1037c6e 100644 (file)
 #ifndef _ZEBRA_NETWORK_H
 #define _ZEBRA_NETWORK_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Both readn and writen are deprecated and will be removed.  They are not
    suitable for use with non-blocking file descriptors.
  */
-extern int readn (int, u_char *, int);
-extern int writen (int, const u_char *, int);
+extern int readn(int, uint8_t *, int);
+extern int writen(int, const uint8_t *, int);
 
 /* Set the file descriptor to use non-blocking I/O.  Returns 0 for success,
    -1 on error. */
@@ -35,10 +39,14 @@ extern int set_nonblocking(int fd);
 extern int set_cloexec(int fd);
 
 /* Does the I/O error indicate that the operation should be retried later? */
-#define ERRNO_IO_RETRY(EN) \
+#define ERRNO_IO_RETRY(EN)                                                     \
        (((EN) == EAGAIN) || ((EN) == EWOULDBLOCK) || ((EN) == EINTR))
 
-extern float htonf (float);
-extern float ntohf (float);
+extern float htonf(float);
+extern float ntohf(float);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _ZEBRA_NETWORK_H */