Lines Matching defs:protocol
3 * (used by different CAN protocol modules)
117 static int can_create(struct net *net, struct socket *sock, int protocol,
126 if (protocol < 0 || protocol >= CAN_NPROTO)
133 /* try to load protocol module kernel is modular */
134 if (!proto_tab[protocol]) {
135 err = request_module("can-proto-%d", protocol);
144 "(can-proto-%d) failed.\n", protocol);
149 cp = proto_tab[protocol];
154 /* check for available protocol and correct usage */
229 skb->protocol = htons(ETH_P_CAN);
512 * Check for bugs in CAN protocol implementations:
668 * af_can protocol functions
672 * can_proto_register - register CAN transport protocol
673 * @cp: pointer to CAN protocol structure
677 * -EINVAL invalid (out of range) protocol number
678 * -EBUSY protocol already in use
683 int proto = cp->protocol;
687 printk(KERN_ERR "can: protocol number %d out of range\n",
698 printk(KERN_ERR "can: protocol %d already registered\n",
718 * can_proto_unregister - unregister CAN transport protocol
719 * @cp: pointer to CAN protocol structure
723 int proto = cp->protocol;
727 printk(KERN_ERR "BUG: can: protocol %d is not registered\n",
832 /* protocol register */
849 /* protocol unregister */