-/* $OpenBSD: in_systm.h,v 1.6 2013/10/19 14:50:21 deraadt Exp $ */
+/* $OpenBSD: in_systm.h,v 1.7 2014/07/13 13:57:56 mpi Exp $ */
/* $NetBSD: in_systm.h,v 1.8 1995/04/13 06:29:22 cgd Exp $ */
/*
typedef u_int32_t n_time; /* ms since 00:00 GMT */
#ifdef _KERNEL
-n_time iptime(void);
+u_int32_t iptime(void);
#endif /* _KERNEL */
#endif /* _NETINET_IN_SYSTM_H_ */
-/* $OpenBSD: ip.h,v 1.15 2014/05/12 09:15:00 mpi Exp $ */
+/* $OpenBSD: ip.h,v 1.16 2014/07/13 13:57:56 mpi Exp $ */
/* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */
/*
ipt_flg:4; /* flags, see below */
#endif
union ipt_timestamp {
- n_time ipt_time[1];
+ u_int32_t ipt_time[1];
struct ipt_ta {
struct in_addr ipt_addr;
- n_time ipt_time;
+ u_int32_t ipt_time;
} ipt_ta[1];
} ipt_timestamp;
};
-/* $OpenBSD: ip_icmp.c,v 1.122 2014/05/07 08:09:33 mpi Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.123 2014/07/13 13:57:56 mpi Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
}
struct mbuf *
-icmp_do_error(struct mbuf *n, int type, int code, n_long dest, int destmtu)
+icmp_do_error(struct mbuf *n, int type, int code, u_int32_t dest, int destmtu)
{
struct ip *oip = mtod(n, struct ip *), *nip;
unsigned oiplen = oip->ip_hl << 2;
* The ip packet inside has ip_off and ip_len in host byte order.
*/
void
-icmp_error(struct mbuf *n, int type, int code, n_long dest, int destmtu)
+icmp_error(struct mbuf *n, int type, int code, u_int32_t dest, int destmtu)
{
struct mbuf *m;
ip_output(m, opts, NULL, 0, NULL, NULL, 0);
}
-n_time
+u_int32_t
iptime(void)
{
struct timeval atv;
-/* $OpenBSD: ip_icmp.h,v 1.25 2013/08/08 14:29:29 mpi Exp $ */
+/* $OpenBSD: ip_icmp.h,v 1.26 2014/07/13 13:57:56 mpi Exp $ */
/* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */
/*
* ICMP Router Advertisement data
*/
struct icmp_ra_addr {
- n_long ira_addr;
- n_long ira_preference;
+ u_int32_t ira_addr;
+ u_int32_t ira_preference;
};
/*
} ih_exthdr;
struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
struct ih_idseq {
- n_short icd_id;
- n_short icd_seq;
+ u_int16_t icd_id;
+ u_int16_t icd_seq;
} ih_idseq;
int32_t ih_void;
/* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
struct ih_pmtu {
- n_short ipm_void;
- n_short ipm_nextmtu;
+ u_int16_t ipm_void;
+ u_int16_t ipm_nextmtu;
} ih_pmtu;
struct ih_rtradv {
u_int8_t irt_num_addrs;
u_int8_t irt_wpa;
- n_short irt_lifetime;
+ u_int16_t irt_lifetime;
} ih_rtradv;
} icmp_hun;
#define icmp_pptr icmp_hun.ih_pptr
#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
union {
struct id_ts {
- n_time its_otime;
- n_time its_rtime;
- n_time its_ttime;
+ u_int32_t its_otime;
+ u_int32_t its_rtime;
+ u_int32_t its_ttime;
} id_ts;
struct id_ip {
struct ip idi_ip;
* ip header length.
*/
#define ICMP_MINLEN 8 /* abs minimum */
-#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
+#define ICMP_TSLEN (8 + 3 * sizeof (u_int32_t)) /* timestamp */
#define ICMP_MASKLEN 12 /* address mask */
#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
#ifdef _KERNEL
struct mbuf *
- icmp_do_error(struct mbuf *, int, int, n_long, int);
-void icmp_error(struct mbuf *, int, int, n_long, int);
+ icmp_do_error(struct mbuf *, int, int, u_int32_t, int);
+void icmp_error(struct mbuf *, int, int, u_int32_t, int);
void icmp_input(struct mbuf *, ...);
void icmp_init(void);
int icmp_reflect(struct mbuf *, struct mbuf **, struct in_ifaddr *);
-/* $OpenBSD: ip_input.c,v 1.234 2014/06/04 12:20:00 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.235 2014/07/13 13:57:56 mpi Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
struct in_ifaddr *ia;
int opt, optlen, cnt, off, code, type = ICMP_PARAMPROB, forward = 0;
struct in_addr sin, dst;
- n_time ntime;
+ u_int32_t ntime;
dst = ip->ip_dst;
cp = (u_char *)(ip + 1);
memcpy(&ipt, cp, sizeof(struct ip_timestamp));
if (ipt.ipt_ptr < 5 || ipt.ipt_len < 5)
goto bad;
- if (ipt.ipt_ptr - 1 + sizeof(n_time) > ipt.ipt_len) {
+ if (ipt.ipt_ptr - 1 + sizeof(u_int32_t) > ipt.ipt_len) {
if (++ipt.ipt_oflw == 0)
goto bad;
break;
break;
case IPOPT_TS_TSANDADDR:
- if (ipt.ipt_ptr - 1 + sizeof(n_time) +
+ if (ipt.ipt_ptr - 1 + sizeof(u_int32_t) +
sizeof(struct in_addr) > ipt.ipt_len)
goto bad;
memset(&ipaddr, 0, sizeof(ipaddr));
break;
case IPOPT_TS_PRESPEC:
- if (ipt.ipt_ptr - 1 + sizeof(n_time) +
+ if (ipt.ipt_ptr - 1 + sizeof(u_int32_t) +
sizeof(struct in_addr) > ipt.ipt_len)
goto bad;
memset(&ipaddr, 0, sizeof(ipaddr));
goto bad;
}
ntime = iptime();
- memcpy(cp + ipt.ipt_ptr - 1, &ntime, sizeof(n_time));
- ipt.ipt_ptr += sizeof(n_time);
+ memcpy(cp + ipt.ipt_ptr - 1, &ntime, sizeof(u_int32_t));
+ ipt.ipt_ptr += sizeof(u_int32_t);
}
}
if (forward && ipforwarding) {
struct rtentry *rt;
int error, type = 0, code = 0, destmtu = 0, fake = 0, len;
u_int rtableid = 0;
- n_long dest;
+ u_int32_t dest;
dest = 0;
if (m->m_flags & (M_BCAST|M_MCAST) || in_canforward(ip->ip_dst) == 0) {
-/* $OpenBSD: tcp_debug.h,v 1.7 2003/06/02 23:28:14 millert Exp $ */
+/* $OpenBSD: tcp_debug.h,v 1.8 2014/07/13 13:57:56 mpi Exp $ */
/* $NetBSD: tcp_debug.h,v 1.5 1994/06/29 06:38:38 cgd Exp $ */
/*
#include <netinet6/tcpipv6.h>
struct tcp_debug {
- n_time td_time;
+ uint32_t td_time;
short td_act;
short td_ostate;
caddr_t td_tcb;