A question about netlink_broadcast()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, All !
int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
                               u32 group, int allocation);

What does the pid mean? Someone said that it is the pid of the receiver.
For example, Kevin He said it delivers a netlink message to both the
process specified by pid and the multicast groups specified by group
(http://www.linuxjournal.com/article/7356.)

But, in function do_one_broadcast() which is called in netlink_broadcast(),
there are some sentences like this:

744  struct netlink_opt *nlk = nlk_sk(sk);
750  if (nlk->pid == p->pid || !(nlk->groups & p->group))
751            goto out;

where p is a variable constructed from parameters of netlink_broadcast().

I think these sentences mean that the parameter pid of netlink_broadcast()
is the sender's pid?

Am I right?

Thanks !

Regard,
Cheng

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux