Lines Matching refs:protocol

122 static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex)  in rtnl_get_doit()  argument
126 if (protocol <= RTNL_FAMILY_MAX) in rtnl_get_doit()
127 tab = rtnl_msg_handlers[protocol]; in rtnl_get_doit()
137 static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex) in rtnl_get_dumpit() argument
141 if (protocol <= RTNL_FAMILY_MAX) in rtnl_get_dumpit()
142 tab = rtnl_msg_handlers[protocol]; in rtnl_get_dumpit()
152 static rtnl_calcit_func rtnl_get_calcit(int protocol, int msgindex) in rtnl_get_calcit() argument
156 if (protocol <= RTNL_FAMILY_MAX) in rtnl_get_calcit()
157 tab = rtnl_msg_handlers[protocol]; in rtnl_get_calcit()
185 int __rtnl_register(int protocol, int msgtype, in __rtnl_register() argument
192 BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); in __rtnl_register()
195 tab = rtnl_msg_handlers[protocol]; in __rtnl_register()
201 rtnl_msg_handlers[protocol] = tab; in __rtnl_register()
226 void rtnl_register(int protocol, int msgtype, in rtnl_register() argument
230 if (__rtnl_register(protocol, msgtype, doit, dumpit, calcit) < 0) in rtnl_register()
233 protocol, msgtype); in rtnl_register()
244 int rtnl_unregister(int protocol, int msgtype) in rtnl_unregister() argument
248 BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); in rtnl_unregister()
251 if (rtnl_msg_handlers[protocol] == NULL) in rtnl_unregister()
254 rtnl_msg_handlers[protocol][msgindex].doit = NULL; in rtnl_unregister()
255 rtnl_msg_handlers[protocol][msgindex].dumpit = NULL; in rtnl_unregister()
268 void rtnl_unregister_all(int protocol) in rtnl_unregister_all() argument
270 BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX); in rtnl_unregister_all()
272 kfree(rtnl_msg_handlers[protocol]); in rtnl_unregister_all()
273 rtnl_msg_handlers[protocol] = NULL; in rtnl_unregister_all()