]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/sockopt.h
Merge pull request #5412 from opensourcerouting/bfdd-vrf-fix
[mirror_frr.git] / lib / sockopt.h
index f54f60ffd7609c77f14a3ecb118f1bb9729fa0ce..59d8a65964bbdd2631e1ffbf37e081a81a98815e 100644 (file)
 
 #include "sockunion.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern void setsockopt_so_recvbuf(int sock, int size);
 extern void setsockopt_so_sendbuf(const int sock, int size);
 extern int getsockopt_so_sendbuf(const int sock);
+extern int getsockopt_so_recvbuf(const int sock);
 
 extern int setsockopt_ipv6_pktinfo(int, int);
-extern int setsockopt_ipv6_checksum(int, int);
 extern int setsockopt_ipv6_multicast_hops(int, int);
 extern int setsockopt_ipv6_unicast_hops(int, int);
 extern int setsockopt_ipv6_hoplimit(int, int);
@@ -96,6 +100,45 @@ extern void sockopt_iphdrincl_swab_htosys(struct ip *iph);
 extern void sockopt_iphdrincl_swab_systoh(struct ip *iph);
 
 extern int sockopt_tcp_rtt(int);
+
+/*
+ * TCP MD5 signature option. This option allows TCP MD5 to be enabled on
+ * addresses.
+ *
+ * sock
+ *    Socket to enable option on.
+ *
+ * su
+ *    Sockunion specifying address to enable option on.
+ *
+ * password
+ *    MD5 auth password
+ */
 extern int sockopt_tcp_signature(int sock, union sockunion *su,
                                 const char *password);
+
+/*
+ * Extended TCP MD5 signature option. This option allows TCP MD5 to be enabled
+ * on prefixes.
+ *
+ * sock
+ *    Socket to enable option on.
+ *
+ * su
+ *    Sockunion specifying address (or prefix) to enable option on.
+ *
+ * prefixlen
+ *    0    - su is an address; fall back to non-extended mode
+ *    Else - su is a prefix; prefixlen is the mask length
+ *
+ * password
+ *    MD5 auth password
+ */
+extern int sockopt_tcp_signature_ext(int sock, union sockunion *su,
+                                    uint16_t prefixlen, const char *password);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*_ZEBRA_SOCKOPT_H */