summaryrefslogtreecommitdiffstats
path: root/sys/netatalk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-09 13:29:16 +0000
committerru <ru@FreeBSD.org>2005-11-09 13:29:16 +0000
commitdcace5669d81e83aea7a22539593b0f158eb224c (patch)
tree54d0f8642eec5f374a08d8a2b18c53a66b4ba269 /sys/netatalk
parenteba5310ce5792d913219b571cd4890c26fea82d8 (diff)
downloadFreeBSD-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/netatalk')
-rw-r--r--sys/netatalk/at_proto.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/sys/netatalk/at_proto.c b/sys/netatalk/at_proto.c
index d5edfc0..19fbcff 100644
--- a/sys/netatalk/at_proto.c
+++ b/sys/netatalk/at_proto.c
@@ -41,30 +41,24 @@ static struct domain atalkdomain;
static struct protosw atalksw[] = {
{
/* Identifiers */
- SOCK_DGRAM, &atalkdomain, ATPROTO_DDP, PR_ATOMIC|PR_ADDR,
- /*
- * protocol-protocol interface.
- * fields are pr_input, pr_output, pr_ctlinput, and pr_ctloutput.
- * pr_input can be called from the udp protocol stack for iptalk
- * packets bound for a local socket.
- * pr_output can be used by higher level appletalk protocols, should
- * they be included in the kernel.
- */
- 0, ddp_output, 0, 0,
- /* socket-protocol interface. deprecated */
- NULL,
- /* utility routines. */
- ddp_init, 0, 0, 0,
- &ddp_usrreqs
+ .pr_type = SOCK_DGRAM,
+ .pr_domain = &atalkdomain,
+ .pr_protocol = ATPROTO_DDP,
+ .pr_flags = PR_ATOMIC|PR_ADDR,
+ .pr_output = ddp_output,
+ .pr_init = ddp_init,
+ .pr_usrreqs = &ddp_usrreqs
},
};
static struct domain atalkdomain = {
- AF_APPLETALK, "appletalk", 0, 0, 0,
- atalksw, &atalksw[sizeof(atalksw)/sizeof(atalksw[0])],
- 0, rn_inithead,
- 8 * (u_long) &((struct sockaddr_at *) 0)->sat_addr,
- sizeof(struct sockaddr_at)
+ .dom_family = AF_APPLETALK,
+ .dom_name = "appletalk",
+ .dom_protosw = atalksw,
+ .dom_protoswNPROTOSW = &atalksw[sizeof(atalksw)/sizeof(atalksw[0])],
+ .dom_rtattach = rn_inithead,
+ .dom_rtoffset = offsetof(struct sockaddr_at, sat_addr) << 3,
+ .dom_maxrtkey = sizeof(struct sockaddr_at)
};
DOMAIN_SET(atalk);
OpenPOWER on IntegriCloud