-/* $OpenBSD: uipc_mbuf.c,v 1.181 2014/04/14 09:06:41 mpi Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.182 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
splx(s);
if (m) {
m->m_type = type;
- m->m_next = (struct mbuf *)NULL;
- m->m_nextpkt = (struct mbuf *)NULL;
+ m->m_next = NULL;
+ m->m_nextpkt = NULL;
m->m_data = m->m_dat;
m->m_flags = 0;
}
m->m_type = type;
/* keep in sync with m_inithdr */
- m->m_next = (struct mbuf *)NULL;
- m->m_nextpkt = (struct mbuf *)NULL;
+ m->m_next = NULL;
+ m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
m_inithdr(struct mbuf *m)
{
/* keep in sync with m_gethdr */
- m->m_next = (struct mbuf *)NULL;
- m->m_nextpkt = (struct mbuf *)NULL;
+ m->m_next = NULL;
+ m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
-/* $OpenBSD: if_gif.c,v 1.64 2013/10/19 14:46:30 mpi Exp $ */
+/* $OpenBSD: if_gif.c,v 1.65 2014/04/21 11:10:54 henning Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
switch (sc->gif_psrc->sa_family) {
#ifdef INET
case AF_INET:
- ip_output(m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
+ ip_output(m, NULL, NULL, 0, NULL, NULL);
break;
#endif
#ifdef INET6
* of inner packet, to achieve path MTU discovery for
* encapsulated packets.
*/
- ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL,
- NULL);
+ ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL);
break;
#endif
default:
-/* $OpenBSD: if_gre.c,v 1.65 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: if_gre.c,v 1.66 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
#endif
/* Send it off */
- error = ip_output(m, (void *)NULL, &sc->route, 0, (void *)NULL, (void *)NULL);
+ error = ip_output(m, NULL, &sc->route, 0, NULL, NULL);
end:
if (error)
ifp->if_oerrors++;
-/* $OpenBSD: pf.c,v 1.873 2014/04/19 12:59:53 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.874 2014/04/21 11:10:54 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
#ifdef INET
case AF_INET:
if (eh == NULL) {
- ip_output(m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
+ ip_output(m, NULL, NULL, 0, NULL, NULL);
} else {
struct route ro;
struct rtentry rt;
memcpy(e->ether_shost, eh->ether_dhost, ETHER_ADDR_LEN);
memcpy(e->ether_dhost, eh->ether_shost, ETHER_ADDR_LEN);
e->ether_type = eh->ether_type;
- ip_output(m, (void *)NULL, &ro, IP_ROUTETOETHER,
- (void *)NULL, (void *)NULL);
+ ip_output(m, NULL, &ro, IP_ROUTETOETHER, NULL, NULL);
}
break;
#endif /* INET */
-/* $OpenBSD: igmp.c,v 1.37 2014/01/21 10:18:26 mpi Exp $ */
+/* $OpenBSD: igmp.c,v 1.38 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
imo.imo_multicast_loop = 0;
#endif /* MROUTING */
- ip_output(m, (struct mbuf *)0, (struct route *)0, IP_MULTICASTOPTS,
- &imo, (void *)NULL);
+ ip_output(m, NULL, NULL, IP_MULTICASTOPTS, &imo, NULL);
++igmpstat.igps_snd_reports;
}
-/* $OpenBSD: ip_icmp.c,v 1.119 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.120 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
printf("icmp_send dst %s src %s\n", dst, src);
}
#endif
- (void)ip_output(m, opts, (void *)NULL, 0, (void *)NULL, (void *)NULL);
+ ip_output(m, opts, NULL, 0, NULL, NULL);
}
n_time
-/* $OpenBSD: ip_input.c,v 1.229 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.230 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
}
}
- error = ip_output(m, (struct mbuf *)NULL, &ipforward_rt,
+ error = ip_output(m, NULL, &ipforward_rt,
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
- (void *)NULL, (void *)NULL);
+ NULL, NULL);
if (error)
ipstat.ips_cantforward++;
else {
-/* $OpenBSD: ip_mroute.c,v 1.64 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.65 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in *src)
{
if (s != NULL) {
- if (sbappendaddr(&s->so_rcv, sintosa(src), mm,
- (struct mbuf *)NULL) != 0) {
+ if (sbappendaddr(&s->so_rcv, sintosa(src), mm, NULL) != 0) {
sorwakeup(s);
return (0);
}
if (vifp->v_flags & VIFF_TUNNEL) {
/* If tunnel options */
- ip_output(m, (struct mbuf *)NULL, &vifp->v_route,
- IP_FORWARDING, (struct ip_moptions *)NULL,
- (struct inpcb *)NULL);
+ ip_output(m, NULL, &vifp->v_route, IP_FORWARDING, NULL, NULL);
} else {
/*
* if physical interface option, extract the options
imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - IPTTLDEC;
imo.imo_multicast_loop = 1;
- error = ip_output(m, (struct mbuf *)NULL, (struct route *)NULL,
- IP_FORWARDING|IP_MULTICASTOPTS, &imo,
- (struct inpcb *)NULL);
+ error = ip_output(m, NULL, NULL,
+ IP_FORWARDING | IP_MULTICASTOPTS, &imo, NULL);
if (mrtdebug & DEBUG_XMIT)
log(LOG_DEBUG, "phyint_send on vif %ld err %d\n",
reg_vif_num);
}
/* NB: vifp was collected above; can it change on us? */
- looutput(vifp, m, (struct sockaddr *)&dst,
- (struct rtentry *)NULL);
+ looutput(vifp, m, (struct sockaddr *)&dst, NULL);
/* prepare the register head to send to the mrouting daemon */
m = mcp;
-/* $OpenBSD: ipsec_output.c,v 1.50 2013/10/24 11:31:43 mpi Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.51 2014/04/21 11:10:54 henning Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
switch (tdb->tdb_dst.sa.sa_family) {
#ifdef INET
case AF_INET:
- return ip_output(m, (void *)NULL, (void *)NULL, IP_RAWOUTPUT, (void *)NULL, (void *)NULL);
+ return (ip_output(m, NULL, NULL, IP_RAWOUTPUT, NULL, NULL));
#endif /* INET */
#ifdef INET6
* We don't need massage, IPv6 header fields are always in
* net endian.
*/
- return ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL);
+ return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL));
#endif /* INET6 */
}
return EINVAL; /* Not reached. */
-/* $OpenBSD: tcp_input.c,v 1.273 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.274 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
#ifdef INET
case AF_INET:
error = ip_output(m, sc->sc_ipopts, ro,
- (ip_mtudisc ? IP_MTUDISC : 0),
- (struct ip_moptions *)NULL, inp);
+ (ip_mtudisc ? IP_MTUDISC : 0), NULL, inp);
break;
#endif
#ifdef INET6
ro->ro_rt ? ro->ro_rt->rt_ifp : NULL);
error = ip6_output(m, NULL /*XXX*/, (struct route_in6 *)ro, 0,
- (struct ip6_moptions *)0, NULL, NULL);
+ NULL, NULL, NULL);
break;
#endif
default:
-/* $OpenBSD: tcp_subr.c,v 1.127 2014/04/18 15:14:25 henning Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.128 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
ip->ip_len = htons(tlen);
ip->ip_ttl = ip_defttl;
ip->ip_tos = 0;
- ip_output(m, (void *)NULL, ro, ip_mtudisc ? IP_MTUDISC : 0,
- (void *)NULL, tp ? tp->t_inpcb : (void *)NULL);
+ ip_output(m, NULL, ro, ip_mtudisc ? IP_MTUDISC : 0,
+ NULL, tp ? tp->t_inpcb : NULL);
}
}
-/* $OpenBSD: in6_src.c,v 1.42 2014/04/18 10:48:30 jca Exp $ */
+/* $OpenBSD: in6_src.c,v 1.43 2014/04/21 11:10:54 henning Exp $ */
/* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */
/*
sin6tosa(&ro->ro_dst)->sa_family != AF_INET6 ||
!IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, dst))) {
RTFREE(ro->ro_rt);
- ro->ro_rt = (struct rtentry *)NULL;
+ ro->ro_rt = NULL;
}
- if (ro->ro_rt == (struct rtentry *)NULL) {
+ if (ro->ro_rt == NULL) {
struct sockaddr_in6 *sa6;
/* No route yet, so try to acquire one */
-/* $OpenBSD: ip6_output.c,v 1.155 2014/04/20 16:48:22 naddy Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.156 2014/04/21 11:10:54 henning Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
((ro_pmtu->ro_rt->rt_flags & RTF_UP) == 0 ||
!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst))) {
RTFREE(ro_pmtu->ro_rt);
- ro_pmtu->ro_rt = (struct rtentry *)NULL;
+ ro_pmtu->ro_rt = NULL;
}
if (ro_pmtu->ro_rt == 0) {
bzero(ro_pmtu, sizeof(*ro_pmtu));