Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300426
b: refs/heads/master
c: b3fe91c
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Apr 2, 2012
1 parent 7134b9b commit 352b594
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e545d71390b50a8dab75efb182a4adc3c2603962
refs/heads/master: b3fe91c53a0a2e1a665b451bd306bcb5e56c2e97
68 changes: 0 additions & 68 deletions trunk/include/net/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,6 @@
* nla_put_flag(skb, type) add flag attribute to skb
* nla_put_msecs(skb, type, jiffies) add msecs attribute to skb
*
* Exceptions Based Attribute Construction:
* NLA_PUT(skb, type, len, data) add attribute to skb
* NLA_PUT_U8(skb, type, value) add u8 attribute to skb
* NLA_PUT_U16(skb, type, value) add u16 attribute to skb
* NLA_PUT_U32(skb, type, value) add u32 attribute to skb
* NLA_PUT_U64(skb, type, value) add u64 attribute to skb
* NLA_PUT_STRING(skb, type, str) add string attribute to skb
* NLA_PUT_FLAG(skb, type) add flag attribute to skb
* NLA_PUT_MSECS(skb, type, jiffies) add msecs attribute to skb
*
* The meaning of these functions is equal to their lower case
* variants but they jump to the label nla_put_failure in case
* of a failure.
*
* Nested Attributes Construction:
* nla_nest_start(skb, type) start a nested attribute
* nla_nest_end(skb, nla) finalize a nested attribute
Expand Down Expand Up @@ -927,60 +913,6 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
return nla_put(skb, attrtype, sizeof(u64), &tmp);
}

#define NLA_PUT(skb, attrtype, attrlen, data) \
do { \
if (unlikely(nla_put(skb, attrtype, attrlen, data) < 0)) \
goto nla_put_failure; \
} while(0)

#define NLA_PUT_TYPE(skb, type, attrtype, value) \
do { \
type __tmp = value; \
NLA_PUT(skb, attrtype, sizeof(type), &__tmp); \
} while(0)

#define NLA_PUT_U8(skb, attrtype, value) \
NLA_PUT_TYPE(skb, u8, attrtype, value)

#define NLA_PUT_U16(skb, attrtype, value) \
NLA_PUT_TYPE(skb, u16, attrtype, value)

#define NLA_PUT_LE16(skb, attrtype, value) \
NLA_PUT_TYPE(skb, __le16, attrtype, value)

#define NLA_PUT_BE16(skb, attrtype, value) \
NLA_PUT_TYPE(skb, __be16, attrtype, value)

#define NLA_PUT_NET16(skb, attrtype, value) \
NLA_PUT_BE16(skb, attrtype | NLA_F_NET_BYTEORDER, value)

#define NLA_PUT_U32(skb, attrtype, value) \
NLA_PUT_TYPE(skb, u32, attrtype, value)

#define NLA_PUT_BE32(skb, attrtype, value) \
NLA_PUT_TYPE(skb, __be32, attrtype, value)

#define NLA_PUT_NET32(skb, attrtype, value) \
NLA_PUT_BE32(skb, attrtype | NLA_F_NET_BYTEORDER, value)

#define NLA_PUT_U64(skb, attrtype, value) \
NLA_PUT_TYPE(skb, u64, attrtype, value)

#define NLA_PUT_BE64(skb, attrtype, value) \
NLA_PUT_TYPE(skb, __be64, attrtype, value)

#define NLA_PUT_NET64(skb, attrtype, value) \
NLA_PUT_BE64(skb, attrtype | NLA_F_NET_BYTEORDER, value)

#define NLA_PUT_STRING(skb, attrtype, value) \
NLA_PUT(skb, attrtype, strlen(value) + 1, value)

#define NLA_PUT_FLAG(skb, attrtype) \
NLA_PUT(skb, attrtype, 0, NULL)

#define NLA_PUT_MSECS(skb, attrtype, jiffies) \
NLA_PUT_U64(skb, attrtype, jiffies_to_msecs(jiffies))

/**
* nla_get_u32 - return payload of u32 attribute
* @nla: u32 netlink attribute
Expand Down

0 comments on commit 352b594

Please sign in to comment.