| 679 | |
| 680 | #ifdef VIMAGE |
| 681 | void |
| 682 | netisr_register_vnet(const struct netisr_handler *nhp) |
| 683 | { |
| 684 | u_int proto; |
| 685 | |
| 686 | proto = nhp->nh_proto; |
| 687 | |
| 688 | KASSERT(curvnet != NULL, ("%s: curvnet is NULL", __func__)); |
| 689 | KASSERT(proto < NETISR_MAXPROT, |
| 690 | ("%s(%u): protocol too big for %s", __func__, proto, nhp->nh_name)); |
| 691 | NETISR_WLOCK(); |
| 692 | KASSERT(netisr_proto[proto].np_handler != NULL, |
| 693 | ("%s(%u): protocol not registered for %s", __func__, proto, |
| 694 | nhp->nh_name)); |
| 695 | |
| 696 | V_netisr_enable[proto] = 1; |
| 697 | NETISR_WUNLOCK(); |
| 698 | } |
| 699 | |
| 700 | static void |
| 701 | netisr_drain_proto_vnet(struct vnet *vnet, u_int proto) |
no outgoing calls
no test coverage detected