diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-26 22:42:39 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-26 22:42:39 +0100 |
commit | d51aa2819005a03e4cfb6f62333be6ccadfb3c06 (patch) | |
tree | 2a76b826cfdac4cf1a94a305f9fe416a2df45840 /sysdep/linux | |
parent | 11cb620266035ffbe17b21c4a174380cb8b6a521 (diff) |
Implementation of MD5 authentication of BGP sessions.
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/sysio.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sysdep/linux/sysio.h b/sysdep/linux/sysio.h index 3a29cdc9..b0aff71f 100644 --- a/sysdep/linux/sysio.h +++ b/sysdep/linux/sysio.h @@ -139,3 +139,24 @@ static inline char *sysio_mcast_join(sock *s) #endif #endif + +#include <linux/socket.h> +#include <linux/tcp.h> + +/* For the case that we have older kernel headers */ +/* Copied from Linux kernel file include/linux/tcp.h */ + +#ifndef TCP_MD5SIG + +#define TCP_MD5SIG 14 +#define TCP_MD5SIG_MAXKEYLEN 80 + +struct tcp_md5sig { + struct __kernel_sockaddr_storage tcpm_addr; /* address associated */ + __u16 __tcpm_pad1; /* zero */ + __u16 tcpm_keylen; /* key length */ + __u32 __tcpm_pad2; /* zero */ + __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ +}; + +#endif |