diff options
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index cf54034019d9..6b827cc6c52f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -398,6 +398,8 @@ extern void tcp_parse_options(struct sk_buff *skb, | |||
398 | struct tcp_options_received *opt_rx, | 398 | struct tcp_options_received *opt_rx, |
399 | int estab); | 399 | int estab); |
400 | 400 | ||
401 | extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); | ||
402 | |||
401 | /* | 403 | /* |
402 | * TCP v4 functions exported for the inet6 API | 404 | * TCP v4 functions exported for the inet6 API |
403 | */ | 405 | */ |
@@ -1113,13 +1115,19 @@ struct tcp_md5sig_pool { | |||
1113 | #define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */ | 1115 | #define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */ |
1114 | 1116 | ||
1115 | /* - functions */ | 1117 | /* - functions */ |
1118 | extern int tcp_calc_md5_hash(char *md5_hash, | ||
1119 | struct tcp_md5sig_key *key, | ||
1120 | int bplen, | ||
1121 | struct tcphdr *th, | ||
1122 | unsigned int tcplen, | ||
1123 | struct tcp_md5sig_pool *hp); | ||
1124 | |||
1116 | extern int tcp_v4_calc_md5_hash(char *md5_hash, | 1125 | extern int tcp_v4_calc_md5_hash(char *md5_hash, |
1117 | struct tcp_md5sig_key *key, | 1126 | struct tcp_md5sig_key *key, |
1118 | struct sock *sk, | 1127 | struct sock *sk, |
1119 | struct dst_entry *dst, | 1128 | struct dst_entry *dst, |
1120 | struct request_sock *req, | 1129 | struct request_sock *req, |
1121 | struct tcphdr *th, | 1130 | struct tcphdr *th, |
1122 | int protocol, | ||
1123 | unsigned int tcplen); | 1131 | unsigned int tcplen); |
1124 | extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, | 1132 | extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, |
1125 | struct sock *addr_sk); | 1133 | struct sock *addr_sk); |
@@ -1132,6 +1140,16 @@ extern int tcp_v4_md5_do_add(struct sock *sk, | |||
1132 | extern int tcp_v4_md5_do_del(struct sock *sk, | 1140 | extern int tcp_v4_md5_do_del(struct sock *sk, |
1133 | __be32 addr); | 1141 | __be32 addr); |
1134 | 1142 | ||
1143 | #ifdef CONFIG_TCP_MD5SIG | ||
1144 | #define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_keylen ? \ | ||
1145 | &(struct tcp_md5sig_key) { \ | ||
1146 | .key = (twsk)->tw_md5_key, \ | ||
1147 | .keylen = (twsk)->tw_md5_keylen, \ | ||
1148 | } : NULL) | ||
1149 | #else | ||
1150 | #define tcp_twsk_md5_key(twsk) NULL | ||
1151 | #endif | ||
1152 | |||
1135 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); | 1153 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); |
1136 | extern void tcp_free_md5sig_pool(void); | 1154 | extern void tcp_free_md5sig_pool(void); |
1137 | 1155 | ||
@@ -1348,7 +1366,7 @@ extern void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo); | |||
1348 | extern struct request_sock_ops tcp_request_sock_ops; | 1366 | extern struct request_sock_ops tcp_request_sock_ops; |
1349 | extern struct request_sock_ops tcp6_request_sock_ops; | 1367 | extern struct request_sock_ops tcp6_request_sock_ops; |
1350 | 1368 | ||
1351 | extern int tcp_v4_destroy_sock(struct sock *sk); | 1369 | extern void tcp_v4_destroy_sock(struct sock *sk); |
1352 | 1370 | ||
1353 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | 1371 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); |
1354 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | 1372 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); |
@@ -1369,7 +1387,6 @@ struct tcp_sock_af_ops { | |||
1369 | struct dst_entry *dst, | 1387 | struct dst_entry *dst, |
1370 | struct request_sock *req, | 1388 | struct request_sock *req, |
1371 | struct tcphdr *th, | 1389 | struct tcphdr *th, |
1372 | int protocol, | ||
1373 | unsigned int len); | 1390 | unsigned int len); |
1374 | int (*md5_add) (struct sock *sk, | 1391 | int (*md5_add) (struct sock *sk, |
1375 | struct sock *addr_sk, | 1392 | struct sock *addr_sk, |