Home | History | Annotate | Download | only in linux

Lines Matching refs:skb

615 extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo);
616 extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
617 extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid,
620 extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
621 extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst,
625 extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
627 #define RTA_PUT(skb, attrtype, attrlen, data) \
628 ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
630 __rta_fill(skb, attrtype, attrlen, data); })
632 #define RTA_APPEND(skb, attrlen, data) \
633 ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \
635 memcpy(skb_put(skb, attrlen), data, attrlen); })
637 #define RTA_PUT_NOHDR(skb, attrlen, data) \
638 ({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \
639 memset(skb_tail_pointer(skb) - (RTA_ALIGN(attrlen) - attrlen), 0, \
642 #define RTA_PUT_U8(skb, attrtype, value) \
644 RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); })
646 skb, attrtype, value) \
648 RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); })
650 #define RTA_PUT_U32(skb, attrtype, value) \
652 RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); })
654 #define RTA_PUT_U64(skb, attrtype, value) \
656 RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); })
658 #define RTA_PUT_SECS(skb, attrtype, value) \
659 RTA_PUT_U64(skb, attrtype, (value) / HZ)
661 #define RTA_PUT_MSECS(skb, attrtype, value) \
662 RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value))
664 #define RTA_PUT_STRING(skb, attrtype, value) \
665 RTA_PUT(skb, attrtype, strlen(value) + 1, value)
667 #define RTA_PUT_FLAG(skb, attrtype) \
668 RTA_PUT(skb, attrtype, 0, NULL);
670 #define RTA_NEST(skb, type) \
671 ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \
672 RTA_PUT(skb, type, 0, NULL); \
675 #define RTA_NEST_END(skb, start) \
676 ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
677 (skb)->len; })
679 #define RTA_NEST_COMPAT(skb, type, attrlen, data) \
680 ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \
681 RTA_PUT(skb, type, attrlen, data); \
682 RTA_NEST(skb, type); \
685 #define RTA_NEST_COMPAT_END(skb, start) \
687 (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
688 RTA_NEST_END(skb, __nest); \
689 (skb)->len; })
691 #define RTA_NEST_CANCEL(skb, start) \
693 skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
724 __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
729 rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size));
736 #define __RTA_PUT(skb, attrtype, attrlen) \
737 ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
739 __rta_reserve(skb, attrtype, attrlen); })