summaryrefslogtreecommitdiffstats
path: root/sys/netnatm
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/netnatm
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/netnatm')
-rw-r--r--sys/netnatm/natm_proto.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c
index 6d7a951..1ff619f 100644
--- a/sys/netnatm/natm_proto.c
+++ b/sys/netnatm/natm_proto.c
@@ -57,30 +57,36 @@ static void natm_init(void);
static struct domain natmdomain;
static struct protosw natmsw[] = {
-{ SOCK_STREAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED,
- 0, 0, 0, 0,
- 0,
- 0, 0, 0, 0,
- &natm_usrreqs
+{
+ .pr_type = SOCK_STREAM,
+ .pr_domain = &natmdomain,
+ .pr_protocol = PROTO_NATMAAL5,
+ .pr_flags = PR_CONNREQUIRED,
+ .pr_usrreqs = &natm_usrreqs
},
-{ SOCK_DGRAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED | PR_ATOMIC,
- 0, 0, 0, 0,
- 0,
- 0, 0, 0, 0,
- &natm_usrreqs
+{
+ .pr_type = SOCK_DGRAM,
+ .pr_domain = &natmdomain,
+ .pr_protocol = PROTO_NATMAAL5,
+ .pr_flags = PR_CONNREQUIRED|PR_ATOMIC,
+ .pr_usrreqs = &natm_usrreqs
},
-{ SOCK_STREAM, &natmdomain, PROTO_NATMAAL0, PR_CONNREQUIRED,
- 0, 0, 0, 0,
- 0,
- 0, 0, 0, 0,
- &natm_usrreqs
+{
+ .pr_type = SOCK_STREAM,
+ .pr_domain = &natmdomain,
+ .pr_protocol = PROTO_NATMAAL0,
+ .pr_flags = PR_CONNREQUIRED,
+ .pr_usrreqs = &natm_usrreqs
},
};
-static struct domain natmdomain =
- { AF_NATM, "natm", natm_init, 0, 0,
- natmsw, &natmsw[sizeof(natmsw)/sizeof(natmsw[0])], 0,
- 0, 0, 0};
+static struct domain natmdomain = {
+ .dom_family = AF_NATM,
+ .dom_name = "natm",
+ .dom_init = natm_init,
+ .dom_protosw = natmsw,
+ .dom_protoswNPROTOSW = &natmsw[sizeof(natmsw)/sizeof(natmsw[0])],
+};
static int natmqmaxlen = 1000 /* IFQ_MAXLEN */; /* max # of packets on queue */
static struct ifqueue natmintrq;
OpenPOWER on IntegriCloud