diff options
author | ru <ru@FreeBSD.org> | 2005-11-09 13:29:16 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-11-09 13:29:16 +0000 |
commit | dcace5669d81e83aea7a22539593b0f158eb224c (patch) | |
tree | 54d0f8642eec5f374a08d8a2b18c53a66b4ba269 /sys/net/if_gre.c | |
parent | eba5310ce5792d913219b571cd4890c26fea82d8 (diff) | |
download | FreeBSD-src-dcace5669d81e83aea7a22539593b0f158eb224c.zip FreeBSD-src-dcace5669d81e83aea7a22539593b0f158eb224c.tar.gz |
Use sparse initializers for "struct domain" and "struct protosw",
so they are easier to follow for the human being.
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r-- | sys/net/if_gre.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 22ceba5..f8165dc 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -118,19 +118,27 @@ static void greattach(void); #ifdef INET extern struct domain inetdomain; -static const struct protosw in_gre_protosw = -{ SOCK_RAW, &inetdomain, IPPROTO_GRE, PR_ATOMIC|PR_ADDR, - (pr_input_t*)gre_input, (pr_output_t*)rip_output, rip_ctlinput, rip_ctloutput, - 0, - 0, 0, 0, 0, - &rip_usrreqs +static const struct protosw in_gre_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_GRE, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = (pr_input_t *)gre_input, + .pr_output = (pr_output_t *)rip_output, + .pr_ctlinput = rip_ctlinput, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; -static const struct protosw in_mobile_protosw = -{ SOCK_RAW, &inetdomain, IPPROTO_MOBILE, PR_ATOMIC|PR_ADDR, - (pr_input_t*)gre_mobile_input, (pr_output_t*)rip_output, rip_ctlinput, rip_ctloutput, - 0, - 0, 0, 0, 0, - &rip_usrreqs +static const struct protosw in_mobile_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_MOBILE, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = (pr_input_t *)gre_mobile_input, + .pr_output = (pr_output_t *)rip_output, + .pr_ctlinput = rip_ctlinput, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; #endif |