-struct protosw inetsw[] = {
-{ 0, &inetdomain, 0, 0,
- 0, 0, 0, 0,
- 0,
- ip_init, 0, ip_slowtimo, ip_drain,
- 0,
- &nousrreqs,
- 0, 0, 0, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_DGRAM, &inetdomain, IPPROTO_UDP, PR_ATOMIC|PR_ADDR|PR_PROTOLOCK|PR_PCBLOCK,
- udp_input, 0, udp_ctlinput, ip_ctloutput,
- 0,
- udp_init, 0, udp_slowtimo, 0,
- 0,
- &udp_usrreqs,
- udp_lock, udp_unlock, udp_getlock, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_STREAM, &inetdomain, IPPROTO_TCP,
- PR_CONNREQUIRED|PR_IMPLOPCL|PR_WANTRCVD|PR_PCBLOCK|PR_PROTOLOCK|PR_DISPOSE,
- tcp_input, 0, tcp_ctlinput, tcp_ctloutput,
- 0,
- tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
- 0,
- &tcp_usrreqs,
- tcp_lock, tcp_unlock, tcp_getlock, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
- rip_input, 0, rip_ctlinput, rip_ctloutput,
- 0,
- 0, 0, 0, 0,
- 0,
- &rip_usrreqs,
- 0, rip_unlock, 0, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_ICMP, PR_ATOMIC|PR_ADDR|PR_LASTHDR,
- icmp_input, 0, 0, rip_ctloutput,
- 0,
- 0, 0, 0, 0,
- 0,
- &rip_usrreqs,
- 0, rip_unlock, 0, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_DGRAM, &inetdomain, IPPROTO_ICMP, PR_ATOMIC|PR_ADDR|PR_LASTHDR,
- icmp_input, 0, 0, icmp_dgram_ctloutput,
- 0,
- 0, 0, 0, 0,
- 0,
- &icmp_dgram_usrreqs,
- 0, rip_unlock, 0, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_IGMP, PR_ATOMIC|PR_ADDR|PR_LASTHDR,
- igmp_input, 0, 0, rip_ctloutput,
- 0,
- igmp_init, igmp_fasttimo, igmp_slowtimo, 0,
- 0,
- &rip_usrreqs,
- 0, rip_unlock, 0, { 0, 0 }, 0, { 0 }
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_RSVP, PR_ATOMIC|PR_ADDR|PR_LASTHDR,
- rsvp_input, 0, 0, rip_ctloutput,
- 0,
- 0, 0, 0, 0,
- 0,
- &rip_usrreqs,
- 0, rip_unlock, 0, { 0, 0 }, 0, { 0 }
-},
+static struct protosw inetsw[] = {
+ {
+ .pr_type = 0,
+ .pr_protocol = 0,
+ .pr_init = ip_init,
+ .pr_drain = ip_drain,
+ .pr_usrreqs = &nousrreqs,
+ },
+ {
+ .pr_type = SOCK_DGRAM,
+ .pr_protocol = IPPROTO_UDP,
+ .pr_flags = PR_ATOMIC | PR_ADDR | PR_PROTOLOCK | PR_PCBLOCK |
+ PR_EVCONNINFO | PR_PRECONN_WRITE,
+ .pr_input = udp_input,
+ .pr_ctlinput = udp_ctlinput,
+ .pr_ctloutput = udp_ctloutput,
+ .pr_init = udp_init,
+ .pr_usrreqs = &udp_usrreqs,
+ .pr_lock = udp_lock,
+ .pr_unlock = udp_unlock,
+ .pr_getlock = udp_getlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },
+ {
+ .pr_type = SOCK_STREAM,
+ .pr_protocol = IPPROTO_TCP,
+ .pr_flags = PR_CONNREQUIRED | PR_WANTRCVD | PR_PCBLOCK |
+ PR_PROTOLOCK | PR_DISPOSE | PR_EVCONNINFO |
+ PR_PRECONN_WRITE | PR_DATA_IDEMPOTENT,
+ .pr_input = tcp_input,
+ .pr_ctlinput = tcp_ctlinput,
+ .pr_ctloutput = tcp_ctloutput,
+ .pr_init = tcp_init,
+ .pr_drain = tcp_drain,
+ .pr_usrreqs = &tcp_usrreqs,
+ .pr_lock = tcp_lock,
+ .pr_unlock = tcp_unlock,
+ .pr_getlock = tcp_getlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },
+ {
+ .pr_type = SOCK_RAW,
+ .pr_protocol = IPPROTO_RAW,
+ .pr_flags = PR_ATOMIC | PR_ADDR,
+ .pr_input = rip_input,
+ .pr_ctlinput = rip_ctlinput,
+ .pr_ctloutput = rip_ctloutput,
+ .pr_usrreqs = &rip_usrreqs,
+ .pr_unlock = rip_unlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },
+ {
+ .pr_type = SOCK_RAW,
+ .pr_protocol = IPPROTO_ICMP,
+ .pr_flags = PR_ATOMIC | PR_ADDR | PR_LASTHDR,
+ .pr_input = icmp_input,
+ .pr_ctloutput = rip_ctloutput,
+ .pr_usrreqs = &rip_usrreqs,
+ .pr_unlock = rip_unlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },
+ {
+ .pr_type = SOCK_DGRAM,
+ .pr_protocol = IPPROTO_ICMP,
+ .pr_flags = PR_ATOMIC | PR_ADDR | PR_LASTHDR,
+ .pr_input = icmp_input,
+ .pr_ctloutput = icmp_dgram_ctloutput,
+ .pr_usrreqs = &icmp_dgram_usrreqs,
+ .pr_unlock = rip_unlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },
+ {
+ .pr_type = SOCK_RAW,
+ .pr_protocol = IPPROTO_IGMP,
+ .pr_flags = PR_ATOMIC | PR_ADDR | PR_LASTHDR,
+ .pr_input = igmp_input,
+ .pr_ctloutput = rip_ctloutput,
+ .pr_init = igmp_init,
+ .pr_usrreqs = &rip_usrreqs,
+ .pr_unlock = rip_unlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },
+ {
+ .pr_type = SOCK_RAW,
+ .pr_protocol = IPPROTO_GRE,
+ .pr_flags = PR_ATOMIC | PR_ADDR,
+ .pr_input = gre_input,
+ .pr_ctlinput = rip_ctlinput,
+ .pr_ctloutput = rip_ctloutput,
+ .pr_usrreqs = &rip_usrreqs,
+ .pr_unlock = rip_unlock,
+ .pr_update_last_owner = inp_update_last_owner,
+ .pr_copy_last_owner = inp_copy_last_owner,
+ },