forked from mirrors/linux
		
	netlink: add nl_set_extack_cookie_u32()
Similar to existing nl_set_extack_cookie_u64(), add new helper nl_set_extack_cookie_u32() which sets extack cookie to a u32 value. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									fe2a31d790
								
							
						
					
					
						commit
						f1388ec4a1
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -119,6 +119,15 @@ static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
 | 
				
			||||||
	extack->cookie_len = sizeof(__cookie);
 | 
						extack->cookie_len = sizeof(__cookie);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void nl_set_extack_cookie_u32(struct netlink_ext_ack *extack,
 | 
				
			||||||
 | 
										    u32 cookie)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						u32 __cookie = cookie;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						memcpy(extack->cookie, &__cookie, sizeof(__cookie));
 | 
				
			||||||
 | 
						extack->cookie_len = sizeof(__cookie);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void netlink_kernel_release(struct sock *sk);
 | 
					void netlink_kernel_release(struct sock *sk);
 | 
				
			||||||
int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
 | 
					int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
 | 
				
			||||||
int netlink_change_ngroups(struct sock *sk, unsigned int groups);
 | 
					int netlink_change_ngroups(struct sock *sk, unsigned int groups);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue