aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/tcp.c b/tcp.c
index e0f693d..ee3c6e5 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1058,18 +1058,17 @@ static void tcp_sock4_iov_init(void)
int i;
for (i = 0; i < ARRAY_SIZE(tcp4_l2_buf); i++) {
- tcp4_l2_buf[i] = (struct tcp4_l2_buf_t) { 0, 0,
- { 0 },
- 0, L2_BUF_ETH_IP4_INIT, L2_BUF_IP4_INIT(IPPROTO_TCP),
- { .doff = sizeof(struct tcphdr) / 4, .ack = 1 }, { 0 },
+ tcp4_l2_buf[i] = (struct tcp4_l2_buf_t) {
+ .eh = L2_BUF_ETH_IP4_INIT,
+ .iph = L2_BUF_IP4_INIT(IPPROTO_TCP),
+ .th = { .doff = sizeof(struct tcphdr) / 4, .ack = 1 }
};
}
for (i = 0; i < ARRAY_SIZE(tcp4_l2_flags_buf); i++) {
- tcp4_l2_flags_buf[i] = (struct tcp4_l2_flags_buf_t) { 0, 0,
- { 0 },
- 0, L2_BUF_ETH_IP4_INIT, L2_BUF_IP4_INIT(IPPROTO_TCP),
- { 0 }, { 0 },
+ tcp4_l2_flags_buf[i] = (struct tcp4_l2_flags_buf_t) {
+ .eh = L2_BUF_ETH_IP4_INIT,
+ .iph = L2_BUF_IP4_INIT(IPPROTO_TCP)
};
}
@@ -1092,17 +1091,16 @@ static void tcp_sock6_iov_init(void)
for (i = 0; i < ARRAY_SIZE(tcp6_l2_buf); i++) {
tcp6_l2_buf[i] = (struct tcp6_l2_buf_t) {
- { 0 },
- 0, L2_BUF_ETH_IP6_INIT, L2_BUF_IP6_INIT(IPPROTO_TCP),
- { .doff = sizeof(struct tcphdr) / 4, .ack = 1 }, { 0 },
+ .eh = L2_BUF_ETH_IP6_INIT,
+ .ip6h = L2_BUF_IP6_INIT(IPPROTO_TCP),
+ .th = { .doff = sizeof(struct tcphdr) / 4, .ack = 1 }
};
}
for (i = 0; i < ARRAY_SIZE(tcp6_l2_flags_buf); i++) {
tcp6_l2_flags_buf[i] = (struct tcp6_l2_flags_buf_t) {
- { 0 },
- 0, L2_BUF_ETH_IP6_INIT, L2_BUF_IP6_INIT(IPPROTO_TCP),
- { 0 }, { 0 },
+ .eh = L2_BUF_ETH_IP6_INIT,
+ .ip6h = L2_BUF_IP6_INIT(IPPROTO_TCP)
};
}