diff options
Diffstat (limited to 'Documentation/connector')
| -rw-r--r-- | Documentation/connector/cn_test.c | 2 | ||||
| -rw-r--r-- | Documentation/connector/connector.txt | 15 | ||||
| -rw-r--r-- | Documentation/connector/ucon.c | 2 | 
3 files changed, 13 insertions, 6 deletions
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c index adcca0368d6..d12cc944b69 100644 --- a/Documentation/connector/cn_test.c +++ b/Documentation/connector/cn_test.c @@ -145,7 +145,7 @@ static void cn_test_timer_func(unsigned long __data)  		memcpy(m + 1, data, m->len); -		cn_netlink_send(m, 0, GFP_ATOMIC); +		cn_netlink_send(m, 0, 0, GFP_ATOMIC);  		kfree(m);  	} diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt index e5c5f5e6ab7..f6215f95149 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/connector/connector.txt @@ -24,7 +24,8 @@ netlink based networking for inter-process communication in a significantly  easier way:  int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); -void cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask); +void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask); +void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask);  struct cb_id  { @@ -71,15 +72,21 @@ void cn_del_callback(struct cb_id *id);   struct cb_id *id		- unique connector's user identifier. -int cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask); +int cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __groups, int gfp_mask); +int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __groups, int gfp_mask);   Sends message to the specified groups.  It can be safely called from   softirq context, but may silently fail under strong memory pressure.   If there are no listeners for given group -ESRCH can be returned.   struct cn_msg *		- message header(with attached data). + u16 len			- for *_multi multiple cn_msg messages can be sent + u32 port			- destination port. + 				  If non-zero the message will be sent to the +				  given port, which should be set to the +				  original sender.   u32 __group			- destination group. -				  If __group is zero, then appropriate group will +				  If port and __group is zero, then appropriate group will  				  be searched through all registered connector users,  				  and message will be delivered to the group which was  				  created for user with the same ID as in msg. @@ -111,7 +118,7 @@ acknowledge number MUST be the same + 1.  If we receive a message and its sequence number is not equal to one we  are expecting, then it is a new message.  If we receive a message and  its sequence number is the same as one we are expecting, but its -acknowledge is not equal to the acknowledge number in the original +acknowledge is not equal to the sequence number in the original  message + 1, then it is a new message.  Obviously, the protocol header contains the above id. diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c index 4848db8c71f..8a4da64e02a 100644 --- a/Documentation/connector/ucon.c +++ b/Documentation/connector/ucon.c @@ -71,7 +71,7 @@ static int netlink_send(int s, struct cn_msg *msg)  	nlh->nlmsg_seq = seq++;  	nlh->nlmsg_pid = getpid();  	nlh->nlmsg_type = NLMSG_DONE; -	nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); +	nlh->nlmsg_len = size;  	nlh->nlmsg_flags = 0;  	m = NLMSG_DATA(nlh);  | 
