dst.h (277a163c83d7ba93fba1e8980d29a9f8bfcfba6c) | dst.h (aad88724c9d54acb1a9737cb6069d8470fa85f74) |
---|---|
1/* 2 * net/dst.h Protocol independent destination cache definitions. 3 * 4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 5 * 6 */ 7 8#ifndef _NET_DST_H --- 31 unchanged lines hidden (view full) --- 40 struct dst_entry *path; 41 struct dst_entry *from; 42#ifdef CONFIG_XFRM 43 struct xfrm_state *xfrm; 44#else 45 void *__pad1; 46#endif 47 int (*input)(struct sk_buff *); | 1/* 2 * net/dst.h Protocol independent destination cache definitions. 3 * 4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 5 * 6 */ 7 8#ifndef _NET_DST_H --- 31 unchanged lines hidden (view full) --- 40 struct dst_entry *path; 41 struct dst_entry *from; 42#ifdef CONFIG_XFRM 43 struct xfrm_state *xfrm; 44#else 45 void *__pad1; 46#endif 47 int (*input)(struct sk_buff *); |
48 int (*output)(struct sk_buff *); | 48 int (*output)(struct sock *sk, struct sk_buff *skb); |
49 50 unsigned short flags; 51#define DST_HOST 0x0001 52#define DST_NOXFRM 0x0002 53#define DST_NOPOLICY 0x0004 54#define DST_NOHASH 0x0008 55#define DST_NOCACHE 0x0010 56#define DST_NOCOUNT 0x0020 --- 305 unchanged lines hidden (view full) --- 362static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) 363{ 364 struct dst_entry *child = dst_clone(skb_dst(skb)->child); 365 366 skb_dst_drop(skb); 367 return child; 368} 369 | 49 50 unsigned short flags; 51#define DST_HOST 0x0001 52#define DST_NOXFRM 0x0002 53#define DST_NOPOLICY 0x0004 54#define DST_NOHASH 0x0008 55#define DST_NOCACHE 0x0010 56#define DST_NOCOUNT 0x0020 --- 305 unchanged lines hidden (view full) --- 362static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) 363{ 364 struct dst_entry *child = dst_clone(skb_dst(skb)->child); 365 366 skb_dst_drop(skb); 367 return child; 368} 369 |
370int dst_discard(struct sk_buff *skb); | 370int dst_discard_sk(struct sock *sk, struct sk_buff *skb); 371static inline int dst_discard(struct sk_buff *skb) 372{ 373 return dst_discard_sk(skb->sk, skb); 374} |
371void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref, 372 int initial_obsolete, unsigned short flags); 373void __dst_free(struct dst_entry *dst); 374struct dst_entry *dst_destroy(struct dst_entry *dst); 375 376static inline void dst_free(struct dst_entry *dst) 377{ 378 if (dst->obsolete > 0) --- 65 unchanged lines hidden (view full) --- 444 if (expires == 0) 445 expires = 1; 446 447 if (dst->expires == 0 || time_before(expires, dst->expires)) 448 dst->expires = expires; 449} 450 451/* Output packet to network from transport. */ | 375void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref, 376 int initial_obsolete, unsigned short flags); 377void __dst_free(struct dst_entry *dst); 378struct dst_entry *dst_destroy(struct dst_entry *dst); 379 380static inline void dst_free(struct dst_entry *dst) 381{ 382 if (dst->obsolete > 0) --- 65 unchanged lines hidden (view full) --- 448 if (expires == 0) 449 expires = 1; 450 451 if (dst->expires == 0 || time_before(expires, dst->expires)) 452 dst->expires = expires; 453} 454 455/* Output packet to network from transport. */ |
456static inline int dst_output_sk(struct sock *sk, struct sk_buff *skb) 457{ 458 return skb_dst(skb)->output(sk, skb); 459} |
|
452static inline int dst_output(struct sk_buff *skb) 453{ | 460static inline int dst_output(struct sk_buff *skb) 461{ |
454 return skb_dst(skb)->output(skb); | 462 return dst_output_sk(skb->sk, skb); |
455} 456 457/* Input packet from network to transport. */ 458static inline int dst_input(struct sk_buff *skb) 459{ 460 return skb_dst(skb)->input(skb); 461} 462 --- 42 unchanged lines hidden --- | 463} 464 465/* Input packet from network to transport. */ 466static inline int dst_input(struct sk_buff *skb) 467{ 468 return skb_dst(skb)->input(skb); 469} 470 --- 42 unchanged lines hidden --- |