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/netkey/keysock.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/netkey/keysock.c')
-rw-r--r-- | sys/netkey/keysock.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/netkey/keysock.c b/sys/netkey/keysock.c index a3ffd15..a19d977 100644 --- a/sys/netkey/keysock.c +++ b/sys/netkey/keysock.c @@ -495,16 +495,24 @@ SYSCTL_NODE(_net, PF_KEY, key, CTLFLAG_RW, 0, "Key Family"); extern struct domain keydomain; struct protosw keysw[] = { -{ SOCK_RAW, &keydomain, PF_KEY_V2, PR_ATOMIC|PR_ADDR, - 0, (pr_output_t *)key_output, raw_ctlinput, 0, - 0, - raw_init, 0, 0, 0, - &key_usrreqs +{ + .pr_type = SOCK_RAW, + .pr_domain = &keydomain, + .pr_protocol = PF_KEY_V2, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_output = (pr_output_t *)key_output, + .pr_ctlinput = raw_ctlinput, + .pr_init = raw_init, + .pr_usrreqs = &key_usrreqs } }; -struct domain keydomain = - { PF_KEY, "key", key_init, 0, 0, - keysw, &keysw[sizeof(keysw)/sizeof(keysw[0])] }; +struct domain keydomain = { + .dom_family = PF_KEY, + .dom_name = "key", + .dom_init = key_init, + .dom_protosw = keysw, + .dom_protoswNPROTOSW = &keysw[sizeof(keysw)/sizeof(keysw[0])] +}; DOMAIN_SET(key); |