| 657 | }; |
| 658 | |
| 659 | static int |
| 660 | memodevent(module_t mod, int type, void *data) |
| 661 | { |
| 662 | |
| 663 | switch (type) { |
| 664 | case MOD_LOAD: |
| 665 | me_srcaddrtab = ip_encap_register_srcaddr(me_srcaddr, |
| 666 | NULL, M_WAITOK); |
| 667 | ecookie = ip_encap_attach(&me_encap_cfg, NULL, M_WAITOK); |
| 668 | break; |
| 669 | case MOD_UNLOAD: |
| 670 | ip_encap_detach(ecookie); |
| 671 | ip_encap_unregister_srcaddr(me_srcaddrtab); |
| 672 | break; |
| 673 | default: |
| 674 | return (EOPNOTSUPP); |
| 675 | } |
| 676 | return (0); |
| 677 | } |
| 678 | |
| 679 | static moduledata_t me_mod = { |
| 680 | "if_me", |
nothing calls this directly
no test coverage detected