Fix initializers.
This commit is contained in:
parent
da6e78aa67
commit
2434b8bf99
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ip_mroute.c,v 1.97 2006/04/25 08:29:08 liamjfoy Exp $ */
|
/* $NetBSD: ip_mroute.c,v 1.98 2006/08/30 19:00:22 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.97 2006/04/25 08:29:08 liamjfoy Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.98 2006/08/30 19:00:22 christos Exp $");
|
||||||
|
|
||||||
#include "opt_inet.h"
|
#include "opt_inet.h"
|
||||||
#include "opt_ipsec.h"
|
#include "opt_ipsec.h"
|
||||||
|
@ -289,17 +289,11 @@ struct ifnet multicast_decap_if[MAXVIFS];
|
||||||
|
|
||||||
/* prototype IP hdr for encapsulated packets */
|
/* prototype IP hdr for encapsulated packets */
|
||||||
struct ip multicast_encap_iphdr = {
|
struct ip multicast_encap_iphdr = {
|
||||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
.ip_hl = sizeof(struct ip) >> 2,
|
||||||
sizeof(struct ip) >> 2, IPVERSION,
|
.ip_v = IPVERSION,
|
||||||
#else
|
.ip_len = sizeof(struct ip),
|
||||||
IPVERSION, sizeof(struct ip) >> 2,
|
.ip_ttl = ENCAP_TTL,
|
||||||
#endif
|
.ip_p = ENCAP_PROTO,
|
||||||
0, /* tos */
|
|
||||||
sizeof(struct ip), /* total length */
|
|
||||||
0, /* id */
|
|
||||||
0, /* frag offset */
|
|
||||||
ENCAP_TTL, ENCAP_PROTO,
|
|
||||||
0, /* checksum */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -344,20 +338,11 @@ struct pim_encap_pimhdr {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ip pim_encap_iphdr = {
|
static struct ip pim_encap_iphdr = {
|
||||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
.ip_v = IPVERSION,
|
||||||
sizeof(struct ip) >> 2,
|
.ip_hl = sizeof(struct ip) >> 2,
|
||||||
IPVERSION,
|
.ip_len = sizeof(struct ip),
|
||||||
#else
|
.ip_ttl = ENCAP_TTL,
|
||||||
IPVERSION,
|
.ip_p = IPPROTO_PIM,
|
||||||
sizeof(struct ip) >> 2,
|
|
||||||
#endif
|
|
||||||
0, /* tos */
|
|
||||||
sizeof(struct ip), /* total length */
|
|
||||||
0, /* id */
|
|
||||||
0, /* frag offset */
|
|
||||||
ENCAP_TTL,
|
|
||||||
IPPROTO_PIM,
|
|
||||||
0, /* checksum */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pim_encap_pimhdr pim_encap_pimhdr = {
|
static struct pim_encap_pimhdr pim_encap_pimhdr = {
|
||||||
|
@ -865,7 +850,10 @@ get_api_config(struct mbuf *m)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sockaddr_in sin = { sizeof(sin), AF_INET };
|
static struct sockaddr_in sin = {
|
||||||
|
.sin_len = sizeof(sin),
|
||||||
|
.sin_family = AF_INET
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a vif to the vif table
|
* Add a vif to the vif table
|
||||||
|
@ -2873,7 +2861,10 @@ bw_upcalls_send(void)
|
||||||
{
|
{
|
||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
int len = bw_upcalls_n * sizeof(bw_upcalls[0]);
|
int len = bw_upcalls_n * sizeof(bw_upcalls[0]);
|
||||||
struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
|
struct sockaddr_in k_igmpsrc = {
|
||||||
|
.sin_len = sizeof(k_igmpsrc),
|
||||||
|
.sin_family = AF_INET,
|
||||||
|
};
|
||||||
static struct igmpmsg igmpmsg = { 0, /* unused1 */
|
static struct igmpmsg igmpmsg = { 0, /* unused1 */
|
||||||
0, /* unused2 */
|
0, /* unused2 */
|
||||||
IGMPMSG_BW_UPCALL,/* im_msgtype */
|
IGMPMSG_BW_UPCALL,/* im_msgtype */
|
||||||
|
@ -3221,7 +3212,10 @@ pim_register_send_upcall(struct ip *ip, struct vif *vifp,
|
||||||
struct mbuf *mb_first;
|
struct mbuf *mb_first;
|
||||||
int len = ntohs(ip->ip_len);
|
int len = ntohs(ip->ip_len);
|
||||||
struct igmpmsg *im;
|
struct igmpmsg *im;
|
||||||
struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
|
struct sockaddr_in k_igmpsrc = {
|
||||||
|
.sin_len = sizeof(k_igmpsrc),
|
||||||
|
.sin_family = AF_INET,
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a new mbuf with an upcall header
|
* Add a new mbuf with an upcall header
|
||||||
|
@ -3441,7 +3435,10 @@ pim_input(struct mbuf *m, ...)
|
||||||
* routing daemon.
|
* routing daemon.
|
||||||
*/
|
*/
|
||||||
int s;
|
int s;
|
||||||
struct sockaddr_in dst = { sizeof(dst), AF_INET };
|
struct sockaddr_in dst = {
|
||||||
|
.sin_len = sizeof(dst),
|
||||||
|
.sin_family = AF_INET,
|
||||||
|
};
|
||||||
struct mbuf *mcp;
|
struct mbuf *mcp;
|
||||||
struct ip *encap_ip;
|
struct ip *encap_ip;
|
||||||
u_int32_t *reghdr;
|
u_int32_t *reghdr;
|
||||||
|
|
Loading…
Reference in New Issue