ipv6.h (0eea505058740aa45486145296ef4fefbd8cab85) | ipv6.h (45f6fad84cc305103b28d73482b344d7f5b76f39) |
---|---|
1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 191 unchanged lines hidden (view full) --- 200extern rwlock_t ip6_ra_lock; 201 202/* 203 This structure is prepared by protocol, when parsing 204 ancillary data and passed to IPv6. 205 */ 206 207struct ipv6_txoptions { | 1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 191 unchanged lines hidden (view full) --- 200extern rwlock_t ip6_ra_lock; 201 202/* 203 This structure is prepared by protocol, when parsing 204 ancillary data and passed to IPv6. 205 */ 206 207struct ipv6_txoptions { |
208 atomic_t refcnt; |
|
208 /* Length of this structure */ 209 int tot_len; 210 211 /* length of extension headers */ 212 213 __u16 opt_flen; /* after fragment hdr */ 214 __u16 opt_nflen; /* before fragment hdr */ 215 216 struct ipv6_opt_hdr *hopopt; 217 struct ipv6_opt_hdr *dst0opt; 218 struct ipv6_rt_hdr *srcrt; /* Routing Header */ 219 struct ipv6_opt_hdr *dst1opt; | 209 /* Length of this structure */ 210 int tot_len; 211 212 /* length of extension headers */ 213 214 __u16 opt_flen; /* after fragment hdr */ 215 __u16 opt_nflen; /* before fragment hdr */ 216 217 struct ipv6_opt_hdr *hopopt; 218 struct ipv6_opt_hdr *dst0opt; 219 struct ipv6_rt_hdr *srcrt; /* Routing Header */ 220 struct ipv6_opt_hdr *dst1opt; |
220 | 221 struct rcu_head rcu; |
221 /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ 222}; 223 224struct ip6_flowlabel { 225 struct ip6_flowlabel __rcu *next; 226 __be32 label; 227 atomic_t users; 228 struct in6_addr dst; --- 18 unchanged lines hidden (view full) --- 247#define IPV6_TCLASS_SHIFT 20 248 249struct ipv6_fl_socklist { 250 struct ipv6_fl_socklist __rcu *next; 251 struct ip6_flowlabel *fl; 252 struct rcu_head rcu; 253}; 254 | 222 /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ 223}; 224 225struct ip6_flowlabel { 226 struct ip6_flowlabel __rcu *next; 227 __be32 label; 228 atomic_t users; 229 struct in6_addr dst; --- 18 unchanged lines hidden (view full) --- 248#define IPV6_TCLASS_SHIFT 20 249 250struct ipv6_fl_socklist { 251 struct ipv6_fl_socklist __rcu *next; 252 struct ip6_flowlabel *fl; 253 struct rcu_head rcu; 254}; 255 |
256static inline struct ipv6_txoptions *txopt_get(const struct ipv6_pinfo *np) 257{ 258 struct ipv6_txoptions *opt; 259 260 rcu_read_lock(); 261 opt = rcu_dereference(np->opt); 262 if (opt && !atomic_inc_not_zero(&opt->refcnt)) 263 opt = NULL; 264 rcu_read_unlock(); 265 return opt; 266} 267 268static inline void txopt_put(struct ipv6_txoptions *opt) 269{ 270 if (opt && atomic_dec_and_test(&opt->refcnt)) 271 kfree_rcu(opt, rcu); 272} 273 |
|
255struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); 256struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, 257 struct ip6_flowlabel *fl, 258 struct ipv6_txoptions *fopt); 259void fl6_free_socklist(struct sock *sk); 260int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); 261int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq, 262 int flags); --- 222 unchanged lines hidden (view full) --- 485 __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX, 486}; 487 488struct ip6_create_arg { 489 __be32 id; 490 u32 user; 491 const struct in6_addr *src; 492 const struct in6_addr *dst; | 274struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); 275struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, 276 struct ip6_flowlabel *fl, 277 struct ipv6_txoptions *fopt); 278void fl6_free_socklist(struct sock *sk); 279int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); 280int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq, 281 int flags); --- 222 unchanged lines hidden (view full) --- 504 __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX, 505}; 506 507struct ip6_create_arg { 508 __be32 id; 509 u32 user; 510 const struct in6_addr *src; 511 const struct in6_addr *dst; |
512 int iif; |
|
493 u8 ecn; 494}; 495 496void ip6_frag_init(struct inet_frag_queue *q, const void *a); 497bool ip6_frag_match(const struct inet_frag_queue *q, const void *a); 498 499/* 500 * Equivalent of ipv4 struct ip --- 487 unchanged lines hidden --- | 513 u8 ecn; 514}; 515 516void ip6_frag_init(struct inet_frag_queue *q, const void *a); 517bool ip6_frag_match(const struct inet_frag_queue *q, const void *a); 518 519/* 520 * Equivalent of ipv4 struct ip --- 487 unchanged lines hidden --- |