diff options
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r-- | include/net/netlink.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index 09175d5d1fbf..9690b0f6698a 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -217,19 +217,19 @@ struct nla_policy { | |||
217 | /** | 217 | /** |
218 | * struct nl_info - netlink source information | 218 | * struct nl_info - netlink source information |
219 | * @nlh: Netlink message header of original request | 219 | * @nlh: Netlink message header of original request |
220 | * @pid: Netlink PID of requesting application | 220 | * @portid: Netlink PORTID of requesting application |
221 | */ | 221 | */ |
222 | struct nl_info { | 222 | struct nl_info { |
223 | struct nlmsghdr *nlh; | 223 | struct nlmsghdr *nlh; |
224 | struct net *nl_net; | 224 | struct net *nl_net; |
225 | u32 pid; | 225 | u32 portid; |
226 | }; | 226 | }; |
227 | 227 | ||
228 | extern int netlink_rcv_skb(struct sk_buff *skb, | 228 | extern int netlink_rcv_skb(struct sk_buff *skb, |
229 | int (*cb)(struct sk_buff *, | 229 | int (*cb)(struct sk_buff *, |
230 | struct nlmsghdr *)); | 230 | struct nlmsghdr *)); |
231 | extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, | 231 | extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, |
232 | u32 pid, unsigned int group, int report, | 232 | u32 portid, unsigned int group, int report, |
233 | gfp_t flags); | 233 | gfp_t flags); |
234 | 234 | ||
235 | extern int nla_validate(const struct nlattr *head, | 235 | extern int nla_validate(const struct nlattr *head, |
@@ -444,7 +444,7 @@ static inline int nlmsg_report(const struct nlmsghdr *nlh) | |||
444 | /** | 444 | /** |
445 | * nlmsg_put - Add a new netlink message to an skb | 445 | * nlmsg_put - Add a new netlink message to an skb |
446 | * @skb: socket buffer to store message in | 446 | * @skb: socket buffer to store message in |
447 | * @pid: netlink process id | 447 | * @portid: netlink process id |
448 | * @seq: sequence number of message | 448 | * @seq: sequence number of message |
449 | * @type: message type | 449 | * @type: message type |
450 | * @payload: length of message payload | 450 | * @payload: length of message payload |
@@ -453,13 +453,13 @@ static inline int nlmsg_report(const struct nlmsghdr *nlh) | |||
453 | * Returns NULL if the tailroom of the skb is insufficient to store | 453 | * Returns NULL if the tailroom of the skb is insufficient to store |
454 | * the message header and payload. | 454 | * the message header and payload. |
455 | */ | 455 | */ |
456 | static inline struct nlmsghdr *nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, | 456 | static inline struct nlmsghdr *nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, |
457 | int type, int payload, int flags) | 457 | int type, int payload, int flags) |
458 | { | 458 | { |
459 | if (unlikely(skb_tailroom(skb) < nlmsg_total_size(payload))) | 459 | if (unlikely(skb_tailroom(skb) < nlmsg_total_size(payload))) |
460 | return NULL; | 460 | return NULL; |
461 | 461 | ||
462 | return __nlmsg_put(skb, pid, seq, type, payload, flags); | 462 | return __nlmsg_put(skb, portid, seq, type, payload, flags); |
463 | } | 463 | } |
464 | 464 | ||
465 | /** | 465 | /** |
@@ -478,7 +478,7 @@ static inline struct nlmsghdr *nlmsg_put_answer(struct sk_buff *skb, | |||
478 | int type, int payload, | 478 | int type, int payload, |
479 | int flags) | 479 | int flags) |
480 | { | 480 | { |
481 | return nlmsg_put(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, | 481 | return nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, |
482 | type, payload, flags); | 482 | type, payload, flags); |
483 | } | 483 | } |
484 | 484 | ||
@@ -563,18 +563,18 @@ static inline void nlmsg_free(struct sk_buff *skb) | |||
563 | * nlmsg_multicast - multicast a netlink message | 563 | * nlmsg_multicast - multicast a netlink message |
564 | * @sk: netlink socket to spread messages to | 564 | * @sk: netlink socket to spread messages to |
565 | * @skb: netlink message as socket buffer | 565 | * @skb: netlink message as socket buffer |
566 | * @pid: own netlink pid to avoid sending to yourself | 566 | * @portid: own netlink portid to avoid sending to yourself |
567 | * @group: multicast group id | 567 | * @group: multicast group id |
568 | * @flags: allocation flags | 568 | * @flags: allocation flags |
569 | */ | 569 | */ |
570 | static inline int nlmsg_multicast(struct sock *sk, struct sk_buff *skb, | 570 | static inline int nlmsg_multicast(struct sock *sk, struct sk_buff *skb, |
571 | u32 pid, unsigned int group, gfp_t flags) | 571 | u32 portid, unsigned int group, gfp_t flags) |
572 | { | 572 | { |
573 | int err; | 573 | int err; |
574 | 574 | ||
575 | NETLINK_CB(skb).dst_group = group; | 575 | NETLINK_CB(skb).dst_group = group; |
576 | 576 | ||
577 | err = netlink_broadcast(sk, skb, pid, group, flags); | 577 | err = netlink_broadcast(sk, skb, portid, group, flags); |
578 | if (err > 0) | 578 | if (err > 0) |
579 | err = 0; | 579 | err = 0; |
580 | 580 | ||
@@ -585,13 +585,13 @@ static inline int nlmsg_multicast(struct sock *sk, struct sk_buff *skb, | |||
585 | * nlmsg_unicast - unicast a netlink message | 585 | * nlmsg_unicast - unicast a netlink message |
586 | * @sk: netlink socket to spread message to | 586 | * @sk: netlink socket to spread message to |
587 | * @skb: netlink message as socket buffer | 587 | * @skb: netlink message as socket buffer |
588 | * @pid: netlink pid of the destination socket | 588 | * @portid: netlink portid of the destination socket |
589 | */ | 589 | */ |
590 | static inline int nlmsg_unicast(struct sock *sk, struct sk_buff *skb, u32 pid) | 590 | static inline int nlmsg_unicast(struct sock *sk, struct sk_buff *skb, u32 portid) |
591 | { | 591 | { |
592 | int err; | 592 | int err; |
593 | 593 | ||
594 | err = netlink_unicast(sk, skb, pid, MSG_DONTWAIT); | 594 | err = netlink_unicast(sk, skb, portid, MSG_DONTWAIT); |
595 | if (err > 0) | 595 | if (err > 0) |
596 | err = 0; | 596 | err = 0; |
597 | 597 | ||