diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-09 22:52:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-10 09:08:23 +0200 |
commit | e599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch) | |
tree | 1172b8b830a1c3236e45c834c2b80e01325ea144 /freebsd/sys/netinet | |
parent | Move files to match FreeBSD layout (diff) | |
download | rtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2 |
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:
o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h
It is now possible to include <sys/socket.h> directly for example.
Generate one Makefile which builds everything including tests.
Diffstat (limited to 'freebsd/sys/netinet')
145 files changed, 5377 insertions, 2479 deletions
diff --git a/freebsd/sys/netinet/accf_data.c b/freebsd/sys/netinet/accf_data.c index 15696daf..7b81cda6 100644 --- a/freebsd/sys/netinet/accf_data.c +++ b/freebsd/sys/netinet/accf_data.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2000 Alfred Perlstein <alfred@FreeBSD.org> @@ -26,17 +26,17 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #define ACCEPT_FILTER_MOD -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/socketvar.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> +#include <sys/sysctl.h> +#include <sys/signalvar.h> +#include <sys/socketvar.h> /* accept filter that holds a socket until data arrives */ diff --git a/freebsd/sys/netinet/accf_dns.c b/freebsd/sys/netinet/accf_dns.c index f91cbb08..abba9d8b 100644 --- a/freebsd/sys/netinet/accf_dns.c +++ b/freebsd/sys/netinet/accf_dns.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (C) 2007 David Malone <dwmalone@FreeBSD.org> @@ -30,13 +30,13 @@ #define ACCEPT_FILTER_MOD -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/socketvar.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <sys/signalvar.h> +#include <sys/sysctl.h> +#include <sys/socketvar.h> /* check for full DNS request */ static int sohasdns(struct socket *so, void *arg, int waitflag); diff --git a/freebsd/sys/netinet/accf_http.c b/freebsd/sys/netinet/accf_http.c index ce21b1d1..4397b439 100644 --- a/freebsd/sys/netinet/accf_http.c +++ b/freebsd/sys/netinet/accf_http.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2000 Paycounter, Inc. @@ -27,18 +27,18 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #define ACCEPT_FILTER_MOD -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/socketvar.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <sys/signalvar.h> +#include <sys/sysctl.h> +#include <sys/socketvar.h> /* check for GET/HEAD */ static int sohashttpget(struct socket *so, void *arg, int waitflag); diff --git a/freebsd/sys/netinet/icmp6.h b/freebsd/sys/netinet/icmp6.h index bf61ac5b..5faae7c1 100644 --- a/freebsd/sys/netinet/icmp6.h +++ b/freebsd/sys/netinet/icmp6.h @@ -1,2 +1,741 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/icmp6.h> +/* $FreeBSD$ */ +/* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */ + +/*- + * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 + */ + +#ifndef _NETINET_ICMP6_H_ +#define _NETINET_ICMP6_H_ + +#define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) + - sizeof(struct icmp6_hdr) */ + +struct icmp6_hdr { + u_int8_t icmp6_type; /* type field */ + u_int8_t icmp6_code; /* code field */ + u_int16_t icmp6_cksum; /* checksum field */ + union { + u_int32_t icmp6_un_data32[1]; /* type-specific field */ + u_int16_t icmp6_un_data16[2]; /* type-specific field */ + u_int8_t icmp6_un_data8[4]; /* type-specific field */ + } icmp6_dataun; +} __packed; + +#define icmp6_data32 icmp6_dataun.icmp6_un_data32 +#define icmp6_data16 icmp6_dataun.icmp6_un_data16 +#define icmp6_data8 icmp6_dataun.icmp6_un_data8 +#define icmp6_pptr icmp6_data32[0] /* parameter prob */ +#define icmp6_mtu icmp6_data32[0] /* packet too big */ +#define icmp6_id icmp6_data16[0] /* echo request/reply */ +#define icmp6_seq icmp6_data16[1] /* echo request/reply */ +#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */ + +#define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */ +#define ICMP6_PACKET_TOO_BIG 2 /* packet too big */ +#define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */ +#define ICMP6_PARAM_PROB 4 /* ip6 header bad */ + +#define ICMP6_ECHO_REQUEST 128 /* echo service */ +#define ICMP6_ECHO_REPLY 129 /* echo reply */ +#define MLD_LISTENER_QUERY 130 /* multicast listener query */ +#define MLD_LISTENER_REPORT 131 /* multicast listener report */ +#define MLD_LISTENER_DONE 132 /* multicast listener done */ +#define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE /* RFC3542 definition */ + +/* RFC2292 decls */ +#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */ +#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */ +#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */ + +#ifndef _KERNEL +/* the followings are for backward compatibility to old KAME apps. */ +#define MLD6_LISTENER_QUERY MLD_LISTENER_QUERY +#define MLD6_LISTENER_REPORT MLD_LISTENER_REPORT +#define MLD6_LISTENER_DONE MLD_LISTENER_DONE +#endif + +#define ND_ROUTER_SOLICIT 133 /* router solicitation */ +#define ND_ROUTER_ADVERT 134 /* router advertisement */ +#define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */ +#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisement */ +#define ND_REDIRECT 137 /* redirect */ + +#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */ + +#define ICMP6_WRUREQUEST 139 /* who are you request */ +#define ICMP6_WRUREPLY 140 /* who are you reply */ +#define ICMP6_FQDN_QUERY 139 /* FQDN query */ +#define ICMP6_FQDN_REPLY 140 /* FQDN reply */ +#define ICMP6_NI_QUERY 139 /* node information request */ +#define ICMP6_NI_REPLY 140 /* node information reply */ +#define MLDV2_LISTENER_REPORT 143 /* RFC3810 listener report */ + +/* The definitions below are experimental. TBA */ +#define MLD_MTRACE_RESP 200 /* mtrace resp (to sender) */ +#define MLD_MTRACE 201 /* mtrace messages */ + +#ifndef _KERNEL +#define MLD6_MTRACE_RESP MLD_MTRACE_RESP +#define MLD6_MTRACE MLD_MTRACE +#endif + +#define ICMP6_MAXTYPE 201 + +#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ +#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */ +#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */ +#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */ +#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */ +#define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */ + +#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */ +#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */ + +#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */ +#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */ +#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */ + +#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */ + +#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */ +#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */ +#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */ + +#define ICMP6_NI_SUCCESS 0 /* node information successful reply */ +#define ICMP6_NI_REFUSED 1 /* node information request is refused */ +#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */ + +#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */ +#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */ +#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */ + +/* Used in kernel only */ +#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */ +#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */ + +/* + * Multicast Listener Discovery + */ +struct mld_hdr { + struct icmp6_hdr mld_icmp6_hdr; + struct in6_addr mld_addr; /* multicast address */ +} __packed; + +/* definitions to provide backward compatibility to old KAME applications */ +#ifndef _KERNEL +#define mld6_hdr mld_hdr +#define mld6_type mld_type +#define mld6_code mld_code +#define mld6_cksum mld_cksum +#define mld6_maxdelay mld_maxdelay +#define mld6_reserved mld_reserved +#define mld6_addr mld_addr +#endif + +/* shortcut macro definitions */ +#define mld_type mld_icmp6_hdr.icmp6_type +#define mld_code mld_icmp6_hdr.icmp6_code +#define mld_cksum mld_icmp6_hdr.icmp6_cksum +#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0] +#define mld_reserved mld_icmp6_hdr.icmp6_data16[1] +#define mld_v2_reserved mld_icmp6_hdr.icmp6_data16[0] +#define mld_v2_numrecs mld_icmp6_hdr.icmp6_data16[1] + +/* + * Neighbor Discovery + */ + +struct nd_router_solicit { /* router solicitation */ + struct icmp6_hdr nd_rs_hdr; + /* could be followed by options */ +} __packed; + +#define nd_rs_type nd_rs_hdr.icmp6_type +#define nd_rs_code nd_rs_hdr.icmp6_code +#define nd_rs_cksum nd_rs_hdr.icmp6_cksum +#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0] + +struct nd_router_advert { /* router advertisement */ + struct icmp6_hdr nd_ra_hdr; + u_int32_t nd_ra_reachable; /* reachable time */ + u_int32_t nd_ra_retransmit; /* retransmit timer */ + /* could be followed by options */ +} __packed; + +#define nd_ra_type nd_ra_hdr.icmp6_type +#define nd_ra_code nd_ra_hdr.icmp6_code +#define nd_ra_cksum nd_ra_hdr.icmp6_cksum +#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0] +#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] +#define ND_RA_FLAG_MANAGED 0x80 +#define ND_RA_FLAG_OTHER 0x40 +#define ND_RA_FLAG_HA 0x20 + +/* + * Router preference values based on draft-draves-ipngwg-router-selection-01. + * These are non-standard definitions. + */ +#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */ + +#define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */ +#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */ +#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */ +#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ + +#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] + +struct nd_neighbor_solicit { /* neighbor solicitation */ + struct icmp6_hdr nd_ns_hdr; + struct in6_addr nd_ns_target; /*target address */ + /* could be followed by options */ +} __packed; + +#define nd_ns_type nd_ns_hdr.icmp6_type +#define nd_ns_code nd_ns_hdr.icmp6_code +#define nd_ns_cksum nd_ns_hdr.icmp6_cksum +#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0] + +struct nd_neighbor_advert { /* neighbor advertisement */ + struct icmp6_hdr nd_na_hdr; + struct in6_addr nd_na_target; /* target address */ + /* could be followed by options */ +} __packed; + +#define nd_na_type nd_na_hdr.icmp6_type +#define nd_na_code nd_na_hdr.icmp6_code +#define nd_na_cksum nd_na_hdr.icmp6_cksum +#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0] +#if BYTE_ORDER == BIG_ENDIAN +#define ND_NA_FLAG_ROUTER 0x80000000 +#define ND_NA_FLAG_SOLICITED 0x40000000 +#define ND_NA_FLAG_OVERRIDE 0x20000000 +#else +#if BYTE_ORDER == LITTLE_ENDIAN +#define ND_NA_FLAG_ROUTER 0x80 +#define ND_NA_FLAG_SOLICITED 0x40 +#define ND_NA_FLAG_OVERRIDE 0x20 +#endif +#endif + +struct nd_redirect { /* redirect */ + struct icmp6_hdr nd_rd_hdr; + struct in6_addr nd_rd_target; /* target address */ + struct in6_addr nd_rd_dst; /* destination address */ + /* could be followed by options */ +} __packed; + +#define nd_rd_type nd_rd_hdr.icmp6_type +#define nd_rd_code nd_rd_hdr.icmp6_code +#define nd_rd_cksum nd_rd_hdr.icmp6_cksum +#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] + +struct nd_opt_hdr { /* Neighbor discovery option header */ + u_int8_t nd_opt_type; + u_int8_t nd_opt_len; + /* followed by option specific data*/ +} __packed; + +#define ND_OPT_SOURCE_LINKADDR 1 +#define ND_OPT_TARGET_LINKADDR 2 +#define ND_OPT_PREFIX_INFORMATION 3 +#define ND_OPT_REDIRECTED_HEADER 4 +#define ND_OPT_MTU 5 + +#define ND_OPT_ROUTE_INFO 200 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */ + +struct nd_opt_prefix_info { /* prefix information */ + u_int8_t nd_opt_pi_type; + u_int8_t nd_opt_pi_len; + u_int8_t nd_opt_pi_prefix_len; + u_int8_t nd_opt_pi_flags_reserved; + u_int32_t nd_opt_pi_valid_time; + u_int32_t nd_opt_pi_preferred_time; + u_int32_t nd_opt_pi_reserved2; + struct in6_addr nd_opt_pi_prefix; +} __packed; + +#define ND_OPT_PI_FLAG_ONLINK 0x80 +#define ND_OPT_PI_FLAG_AUTO 0x40 + +struct nd_opt_rd_hdr { /* redirected header */ + u_int8_t nd_opt_rh_type; + u_int8_t nd_opt_rh_len; + u_int16_t nd_opt_rh_reserved1; + u_int32_t nd_opt_rh_reserved2; + /* followed by IP header and data */ +} __packed; + +struct nd_opt_mtu { /* MTU option */ + u_int8_t nd_opt_mtu_type; + u_int8_t nd_opt_mtu_len; + u_int16_t nd_opt_mtu_reserved; + u_int32_t nd_opt_mtu_mtu; +} __packed; + +struct nd_opt_route_info { /* route info */ + u_int8_t nd_opt_rti_type; + u_int8_t nd_opt_rti_len; + u_int8_t nd_opt_rti_prefixlen; + u_int8_t nd_opt_rti_flags; + u_int32_t nd_opt_rti_lifetime; + /* prefix follows */ +} __packed; + +/* + * icmp6 namelookup + */ + +struct icmp6_namelookup { + struct icmp6_hdr icmp6_nl_hdr; + u_int8_t icmp6_nl_nonce[8]; + int32_t icmp6_nl_ttl; +#if 0 + u_int8_t icmp6_nl_len; + u_int8_t icmp6_nl_name[3]; +#endif + /* could be followed by options */ +} __packed; + +/* + * icmp6 node information + */ +struct icmp6_nodeinfo { + struct icmp6_hdr icmp6_ni_hdr; + u_int8_t icmp6_ni_nonce[8]; + /* could be followed by reply data */ +} __packed; + +#define ni_type icmp6_ni_hdr.icmp6_type +#define ni_code icmp6_ni_hdr.icmp6_code +#define ni_cksum icmp6_ni_hdr.icmp6_cksum +#define ni_qtype icmp6_ni_hdr.icmp6_data16[0] +#define ni_flags icmp6_ni_hdr.icmp6_data16[1] + +#define NI_QTYPE_NOOP 0 /* NOOP */ +#define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */ +#define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */ +#define NI_QTYPE_DNSNAME 2 /* DNS Name */ +#define NI_QTYPE_NODEADDR 3 /* Node Addresses */ +#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */ + +#if BYTE_ORDER == BIG_ENDIAN +#define NI_SUPTYPE_FLAG_COMPRESS 0x1 +#define NI_FQDN_FLAG_VALIDTTL 0x1 +#elif BYTE_ORDER == LITTLE_ENDIAN +#define NI_SUPTYPE_FLAG_COMPRESS 0x0100 +#define NI_FQDN_FLAG_VALIDTTL 0x0100 +#endif + +#ifdef NAME_LOOKUPS_04 +#if BYTE_ORDER == BIG_ENDIAN +#define NI_NODEADDR_FLAG_LINKLOCAL 0x1 +#define NI_NODEADDR_FLAG_SITELOCAL 0x2 +#define NI_NODEADDR_FLAG_GLOBAL 0x4 +#define NI_NODEADDR_FLAG_ALL 0x8 +#define NI_NODEADDR_FLAG_TRUNCATE 0x10 +#define NI_NODEADDR_FLAG_ANYCAST 0x20 /* just experimental. not in spec */ +#elif BYTE_ORDER == LITTLE_ENDIAN +#define NI_NODEADDR_FLAG_LINKLOCAL 0x0100 +#define NI_NODEADDR_FLAG_SITELOCAL 0x0200 +#define NI_NODEADDR_FLAG_GLOBAL 0x0400 +#define NI_NODEADDR_FLAG_ALL 0x0800 +#define NI_NODEADDR_FLAG_TRUNCATE 0x1000 +#define NI_NODEADDR_FLAG_ANYCAST 0x2000 /* just experimental. not in spec */ +#endif +#else /* draft-ietf-ipngwg-icmp-name-lookups-05 (and later?) */ +#if BYTE_ORDER == BIG_ENDIAN +#define NI_NODEADDR_FLAG_TRUNCATE 0x1 +#define NI_NODEADDR_FLAG_ALL 0x2 +#define NI_NODEADDR_FLAG_COMPAT 0x4 +#define NI_NODEADDR_FLAG_LINKLOCAL 0x8 +#define NI_NODEADDR_FLAG_SITELOCAL 0x10 +#define NI_NODEADDR_FLAG_GLOBAL 0x20 +#define NI_NODEADDR_FLAG_ANYCAST 0x40 /* just experimental. not in spec */ +#elif BYTE_ORDER == LITTLE_ENDIAN +#define NI_NODEADDR_FLAG_TRUNCATE 0x0100 +#define NI_NODEADDR_FLAG_ALL 0x0200 +#define NI_NODEADDR_FLAG_COMPAT 0x0400 +#define NI_NODEADDR_FLAG_LINKLOCAL 0x0800 +#define NI_NODEADDR_FLAG_SITELOCAL 0x1000 +#define NI_NODEADDR_FLAG_GLOBAL 0x2000 +#define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */ +#endif +#endif + +struct ni_reply_fqdn { + u_int32_t ni_fqdn_ttl; /* TTL */ + u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */ + u_int8_t ni_fqdn_name[3]; /* XXX: alignment */ +} __packed; + +/* + * Router Renumbering. as router-renum-08.txt + */ +struct icmp6_router_renum { /* router renumbering header */ + struct icmp6_hdr rr_hdr; + u_int8_t rr_segnum; + u_int8_t rr_flags; + u_int16_t rr_maxdelay; + u_int32_t rr_reserved; +} __packed; + +#define ICMP6_RR_FLAGS_TEST 0x80 +#define ICMP6_RR_FLAGS_REQRESULT 0x40 +#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20 +#define ICMP6_RR_FLAGS_SPECSITE 0x10 +#define ICMP6_RR_FLAGS_PREVDONE 0x08 + +#define rr_type rr_hdr.icmp6_type +#define rr_code rr_hdr.icmp6_code +#define rr_cksum rr_hdr.icmp6_cksum +#define rr_seqnum rr_hdr.icmp6_data32[0] + +struct rr_pco_match { /* match prefix part */ + u_int8_t rpm_code; + u_int8_t rpm_len; + u_int8_t rpm_ordinal; + u_int8_t rpm_matchlen; + u_int8_t rpm_minlen; + u_int8_t rpm_maxlen; + u_int16_t rpm_reserved; + struct in6_addr rpm_prefix; +} __packed; + +#define RPM_PCO_ADD 1 +#define RPM_PCO_CHANGE 2 +#define RPM_PCO_SETGLOBAL 3 +#define RPM_PCO_MAX 4 + +struct rr_pco_use { /* use prefix part */ + u_int8_t rpu_uselen; + u_int8_t rpu_keeplen; + u_int8_t rpu_ramask; + u_int8_t rpu_raflags; + u_int32_t rpu_vltime; + u_int32_t rpu_pltime; + u_int32_t rpu_flags; + struct in6_addr rpu_prefix; +} __packed; +#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80 +#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40 + +#if BYTE_ORDER == BIG_ENDIAN +#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 +#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 +#elif BYTE_ORDER == LITTLE_ENDIAN +#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 +#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 +#endif + +struct rr_result { /* router renumbering result message */ + u_int16_t rrr_flags; + u_int8_t rrr_ordinal; + u_int8_t rrr_matchedlen; + u_int32_t rrr_ifid; + struct in6_addr rrr_prefix; +} __packed; +#if BYTE_ORDER == BIG_ENDIAN +#define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 +#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 +#elif BYTE_ORDER == LITTLE_ENDIAN +#define ICMP6_RR_RESULT_FLAGS_OOB 0x0200 +#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100 +#endif + +/* + * icmp6 filter structures. + */ + +struct icmp6_filter { + u_int32_t icmp6_filt[8]; +}; + +#ifdef _KERNEL +#define ICMP6_FILTER_SETPASSALL(filterp) \ +do { \ + int i; u_char *p; \ + p = (u_char *)filterp; \ + for (i = 0; i < sizeof(struct icmp6_filter); i++) \ + p[i] = 0xff; \ +} while (/*CONSTCOND*/ 0) +#define ICMP6_FILTER_SETBLOCKALL(filterp) \ + bzero(filterp, sizeof(struct icmp6_filter)) +#else /* _KERNEL */ +#define ICMP6_FILTER_SETPASSALL(filterp) \ + memset(filterp, 0xff, sizeof(struct icmp6_filter)) +#define ICMP6_FILTER_SETBLOCKALL(filterp) \ + memset(filterp, 0x00, sizeof(struct icmp6_filter)) +#endif /* _KERNEL */ + +#define ICMP6_FILTER_SETPASS(type, filterp) \ + (((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))) +#define ICMP6_FILTER_SETBLOCK(type, filterp) \ + (((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))) +#define ICMP6_FILTER_WILLPASS(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) +#define ICMP6_FILTER_WILLBLOCK(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) + +/* + * Variables related to this implementation + * of the internet control message protocol version 6. + */ +struct icmp6errstat { + u_quad_t icp6errs_dst_unreach_noroute; + u_quad_t icp6errs_dst_unreach_admin; + u_quad_t icp6errs_dst_unreach_beyondscope; + u_quad_t icp6errs_dst_unreach_addr; + u_quad_t icp6errs_dst_unreach_noport; + u_quad_t icp6errs_packet_too_big; + u_quad_t icp6errs_time_exceed_transit; + u_quad_t icp6errs_time_exceed_reassembly; + u_quad_t icp6errs_paramprob_header; + u_quad_t icp6errs_paramprob_nextheader; + u_quad_t icp6errs_paramprob_option; + u_quad_t icp6errs_redirect; /* we regard redirect as an error here */ + u_quad_t icp6errs_unknown; +}; + +struct icmp6stat { +/* statistics related to icmp6 packets generated */ + u_quad_t icp6s_error; /* # of calls to icmp6_error */ + u_quad_t icp6s_canterror; /* no error 'cuz old was icmp */ + u_quad_t icp6s_toofreq; /* no error 'cuz rate limitation */ + u_quad_t icp6s_outhist[256]; +/* statistics related to input message processed */ + u_quad_t icp6s_badcode; /* icmp6_code out of range */ + u_quad_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */ + u_quad_t icp6s_checksum; /* bad checksum */ + u_quad_t icp6s_badlen; /* calculated bound mismatch */ + /* + * number of responses: this member is inherited from netinet code, but + * for netinet6 code, it is already available in icp6s_outhist[]. + */ + u_quad_t icp6s_reflect; + u_quad_t icp6s_inhist[256]; + u_quad_t icp6s_nd_toomanyopt; /* too many ND options */ + struct icmp6errstat icp6s_outerrhist; +#define icp6s_odst_unreach_noroute \ + icp6s_outerrhist.icp6errs_dst_unreach_noroute +#define icp6s_odst_unreach_admin icp6s_outerrhist.icp6errs_dst_unreach_admin +#define icp6s_odst_unreach_beyondscope \ + icp6s_outerrhist.icp6errs_dst_unreach_beyondscope +#define icp6s_odst_unreach_addr icp6s_outerrhist.icp6errs_dst_unreach_addr +#define icp6s_odst_unreach_noport icp6s_outerrhist.icp6errs_dst_unreach_noport +#define icp6s_opacket_too_big icp6s_outerrhist.icp6errs_packet_too_big +#define icp6s_otime_exceed_transit \ + icp6s_outerrhist.icp6errs_time_exceed_transit +#define icp6s_otime_exceed_reassembly \ + icp6s_outerrhist.icp6errs_time_exceed_reassembly +#define icp6s_oparamprob_header icp6s_outerrhist.icp6errs_paramprob_header +#define icp6s_oparamprob_nextheader \ + icp6s_outerrhist.icp6errs_paramprob_nextheader +#define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option +#define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect +#define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown + u_quad_t icp6s_pmtuchg; /* path MTU changes */ + u_quad_t icp6s_nd_badopt; /* bad ND options */ + u_quad_t icp6s_badns; /* bad neighbor solicitation */ + u_quad_t icp6s_badna; /* bad neighbor advertisement */ + u_quad_t icp6s_badrs; /* bad router advertisement */ + u_quad_t icp6s_badra; /* bad router advertisement */ + u_quad_t icp6s_badredirect; /* bad redirect message */ +}; + +#ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ +#define ICMP6STAT_ADD(name, val) V_icmp6stat.name += (val) +#define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_icmp6stat_inc(int statnum); +#define KMOD_ICMP6STAT_INC(name) \ + kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(u_quad_t)) +#endif + +/* + * Names for ICMP sysctl objects + */ +#define ICMPV6CTL_STATS 1 +#define ICMPV6CTL_REDIRACCEPT 2 /* accept/process redirects */ +#define ICMPV6CTL_REDIRTIMEOUT 3 /* redirect cache time */ +#if 0 /*obsoleted*/ +#define ICMPV6CTL_ERRRATELIMIT 5 /* ICMPv6 error rate limitation */ +#endif +#define ICMPV6CTL_ND6_PRUNE 6 +#define ICMPV6CTL_ND6_DELAY 8 +#define ICMPV6CTL_ND6_UMAXTRIES 9 +#define ICMPV6CTL_ND6_MMAXTRIES 10 +#define ICMPV6CTL_ND6_USELOOPBACK 11 +/*#define ICMPV6CTL_ND6_PROXYALL 12 obsoleted, do not reuse here */ +#define ICMPV6CTL_NODEINFO 13 +#define ICMPV6CTL_ERRPPSLIMIT 14 /* ICMPv6 error pps limitation */ +#define ICMPV6CTL_ND6_MAXNUDHINT 15 +#define ICMPV6CTL_MTUDISC_HIWAT 16 +#define ICMPV6CTL_MTUDISC_LOWAT 17 +#define ICMPV6CTL_ND6_DEBUG 18 +#define ICMPV6CTL_ND6_DRLIST 19 +#define ICMPV6CTL_ND6_PRLIST 20 +#define ICMPV6CTL_MLD_MAXSRCFILTER 21 +#define ICMPV6CTL_MLD_SOMAXSRC 22 +#define ICMPV6CTL_MLD_VERSION 23 +#define ICMPV6CTL_ND6_MAXQLEN 24 +#define ICMPV6CTL_MAXID 25 + +#define RTF_PROBEMTU RTF_PROTO1 + +#ifdef _KERNEL +# ifdef __STDC__ +struct rtentry; +struct rttimer; +struct in6_multi; +# endif +void icmp6_paramerror(struct mbuf *, int); +void icmp6_error(struct mbuf *, int, int, int); +void icmp6_error2(struct mbuf *, int, int, int, struct ifnet *); +int icmp6_input(struct mbuf **, int *, int); +void icmp6_fasttimo(void); +void icmp6_slowtimo(void); +void icmp6_reflect(struct mbuf *, size_t); +void icmp6_prepare(struct mbuf *); +void icmp6_redirect_input(struct mbuf *, int); +void icmp6_redirect_output(struct mbuf *, struct rtentry *); + +struct ip6ctlparam; +void icmp6_mtudisc_update(struct ip6ctlparam *, int); + +/* XXX: is this the right place for these macros? */ +#define icmp6_ifstat_inc(ifp, tag) \ +do { \ + if (ifp) \ + ((struct in6_ifextra *)((ifp)->if_afdata[AF_INET6]))->icmp6_ifstat->tag++; \ +} while (/*CONSTCOND*/ 0) + +#define icmp6_ifoutstat_inc(ifp, type, code) \ +do { \ + icmp6_ifstat_inc(ifp, ifs6_out_msg); \ + if (type < ICMP6_INFOMSG_MASK) \ + icmp6_ifstat_inc(ifp, ifs6_out_error); \ + switch (type) { \ + case ICMP6_DST_UNREACH: \ + icmp6_ifstat_inc(ifp, ifs6_out_dstunreach); \ + if (code == ICMP6_DST_UNREACH_ADMIN) \ + icmp6_ifstat_inc(ifp, ifs6_out_adminprohib); \ + break; \ + case ICMP6_PACKET_TOO_BIG: \ + icmp6_ifstat_inc(ifp, ifs6_out_pkttoobig); \ + break; \ + case ICMP6_TIME_EXCEEDED: \ + icmp6_ifstat_inc(ifp, ifs6_out_timeexceed); \ + break; \ + case ICMP6_PARAM_PROB: \ + icmp6_ifstat_inc(ifp, ifs6_out_paramprob); \ + break; \ + case ICMP6_ECHO_REQUEST: \ + icmp6_ifstat_inc(ifp, ifs6_out_echo); \ + break; \ + case ICMP6_ECHO_REPLY: \ + icmp6_ifstat_inc(ifp, ifs6_out_echoreply); \ + break; \ + case MLD_LISTENER_QUERY: \ + icmp6_ifstat_inc(ifp, ifs6_out_mldquery); \ + break; \ + case MLD_LISTENER_REPORT: \ + icmp6_ifstat_inc(ifp, ifs6_out_mldreport); \ + break; \ + case MLD_LISTENER_DONE: \ + icmp6_ifstat_inc(ifp, ifs6_out_mlddone); \ + break; \ + case ND_ROUTER_SOLICIT: \ + icmp6_ifstat_inc(ifp, ifs6_out_routersolicit); \ + break; \ + case ND_ROUTER_ADVERT: \ + icmp6_ifstat_inc(ifp, ifs6_out_routeradvert); \ + break; \ + case ND_NEIGHBOR_SOLICIT: \ + icmp6_ifstat_inc(ifp, ifs6_out_neighborsolicit); \ + break; \ + case ND_NEIGHBOR_ADVERT: \ + icmp6_ifstat_inc(ifp, ifs6_out_neighboradvert); \ + break; \ + case ND_REDIRECT: \ + icmp6_ifstat_inc(ifp, ifs6_out_redirect); \ + break; \ + } \ +} while (/*CONSTCOND*/ 0) + +VNET_DECLARE(int, icmp6_rediraccept); /* accept/process redirects */ +VNET_DECLARE(int, icmp6_redirtimeout); /* cache time for redirect routes */ + +#define V_icmp6_rediraccept VNET(icmp6_rediraccept) +#define V_icmp6_redirtimeout VNET(icmp6_redirtimeout) + +#define ICMP6_NODEINFO_FQDNOK 0x1 +#define ICMP6_NODEINFO_NODEADDROK 0x2 +#define ICMP6_NODEINFO_TMPADDROK 0x4 +#define ICMP6_NODEINFO_GLOBALOK 0x8 +#endif /* _KERNEL */ + +#endif /* not _NETINET_ICMP6_H_ */ diff --git a/freebsd/sys/netinet/icmp_var.h b/freebsd/sys/netinet/icmp_var.h index d55fc4d3..30da6a26 100644 --- a/freebsd/sys/netinet/icmp_var.h +++ b/freebsd/sys/netinet/icmp_var.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_ICMP_VAR_HH_ -#define _NETINET_ICMP_VAR_HH_ +#ifndef _NETINET_ICMP_VAR_H_ +#define _NETINET_ICMP_VAR_H_ /* diff --git a/freebsd/sys/netinet/if_atm.c b/freebsd/sys/netinet/if_atm.c index ea6c567d..1c51718d 100644 --- a/freebsd/sys/netinet/if_atm.c +++ b/freebsd/sys/netinet/if_atm.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* $NetBSD: if_atm.c,v 1.6 1996/10/13 02:03:01 christos Exp $ */ @@ -33,36 +33,36 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* * IP <=> ATM address resolution. */ -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_natm.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_natm.h> #if defined(INET) || defined(INET6) -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/queue.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/sockio.h> -#include <freebsd/sys/syslog.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/queue.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/sockio.h> +#include <sys/syslog.h> -#include <freebsd/net/if.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/route.h> -#include <freebsd/net/if_atm.h> +#include <net/if.h> +#include <net/if_dl.h> +#include <net/route.h> +#include <net/if_atm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/if_atm.h> +#include <netinet/in.h> +#include <netinet/if_atm.h> #ifdef NATM -#include <freebsd/netnatm/natm.h> +#include <netnatm/natm.h> #endif #define SDL(s) ((struct sockaddr_dl *)s) diff --git a/freebsd/sys/netinet/if_ether.c b/freebsd/sys/netinet/if_ether.c index 2e40c0d2..e7a20c2c 100644 --- a/freebsd/sys/netinet/if_ether.c +++ b/freebsd/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -37,43 +37,43 @@ * add "inuse/lock" bit (or ref. count) along with valid bit */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/queue.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/syslog.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/if_llc.h> -#include <freebsd/net/ethernet.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/net/if_llatbl.h> -#include <freebsd/netinet/if_ether.h> +#include <rtems/bsd/local/opt_inet.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/queue.h> +#include <sys/sysctl.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <sys/malloc.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/syslog.h> + +#include <net/if.h> +#include <net/if_dl.h> +#include <net/if_types.h> +#include <net/netisr.h> +#include <net/if_llc.h> +#include <net/ethernet.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <net/if_llatbl.h> +#include <netinet/if_ether.h> #if defined(INET) || defined(INET6) -#include <freebsd/netinet/ip_carp.h> +#include <netinet/ip_carp.h> #endif -#include <freebsd/net/if_arc.h> -#include <freebsd/net/iso88025.h> +#include <net/if_arc.h> +#include <net/iso88025.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #define SIN(s) ((struct sockaddr_in *)s) #define SDL(s) ((struct sockaddr_dl *)s) diff --git a/freebsd/sys/netinet/if_ether.h b/freebsd/sys/netinet/if_ether.h index e3c8d009..ce63d8db 100644 --- a/freebsd/sys/netinet/if_ether.h +++ b/freebsd/sys/netinet/if_ether.h @@ -1,2 +1,122 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/if_ether.h> +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 + * $FreeBSD$ + */ + +#ifndef _NETINET_IF_ETHER_H_ +#define _NETINET_IF_ETHER_H_ + +#include <net/ethernet.h> +#include <net/if_arp.h> + +/* + * Macro to map an IP multicast address to an Ethernet multicast address. + * The high-order 25 bits of the Ethernet address are statically assigned, + * and the low-order 23 bits are taken from the low end of the IP address. + */ +#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \ + /* struct in_addr *ipaddr; */ \ + /* u_char enaddr[ETHER_ADDR_LEN]; */ \ +{ \ + (enaddr)[0] = 0x01; \ + (enaddr)[1] = 0x00; \ + (enaddr)[2] = 0x5e; \ + (enaddr)[3] = ((u_char *)ipaddr)[1] & 0x7f; \ + (enaddr)[4] = ((u_char *)ipaddr)[2]; \ + (enaddr)[5] = ((u_char *)ipaddr)[3]; \ +} +/* + * Macro to map an IP6 multicast address to an Ethernet multicast address. + * The high-order 16 bits of the Ethernet address are statically assigned, + * and the low-order 32 bits are taken from the low end of the IP6 address. + */ +#define ETHER_MAP_IPV6_MULTICAST(ip6addr, enaddr) \ +/* struct in6_addr *ip6addr; */ \ +/* u_char enaddr[ETHER_ADDR_LEN]; */ \ +{ \ + (enaddr)[0] = 0x33; \ + (enaddr)[1] = 0x33; \ + (enaddr)[2] = ((u_char *)ip6addr)[12]; \ + (enaddr)[3] = ((u_char *)ip6addr)[13]; \ + (enaddr)[4] = ((u_char *)ip6addr)[14]; \ + (enaddr)[5] = ((u_char *)ip6addr)[15]; \ +} + +/* + * Ethernet Address Resolution Protocol. + * + * See RFC 826 for protocol description. Structure below is adapted + * to resolving internet addresses. Field names used correspond to + * RFC 826. + */ +struct ether_arp { + struct arphdr ea_hdr; /* fixed-size header */ + u_char arp_sha[ETHER_ADDR_LEN]; /* sender hardware address */ + u_char arp_spa[4]; /* sender protocol address */ + u_char arp_tha[ETHER_ADDR_LEN]; /* target hardware address */ + u_char arp_tpa[4]; /* target protocol address */ +}; +#define arp_hrd ea_hdr.ar_hrd +#define arp_pro ea_hdr.ar_pro +#define arp_hln ea_hdr.ar_hln +#define arp_pln ea_hdr.ar_pln +#define arp_op ea_hdr.ar_op + +struct sockaddr_inarp { + u_char sin_len; + u_char sin_family; + u_short sin_port; + struct in_addr sin_addr; + struct in_addr sin_srcaddr; + u_short sin_tos; + u_short sin_other; +#define SIN_PROXY 1 +}; +/* + * IP and ethernet specific routing flags + */ +#define RTF_USETRAILERS RTF_PROTO1 /* use trailers */ +#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */ + +#ifdef _KERNEL +extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN]; +extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN]; + +struct llentry; +struct ifaddr; + +int arpresolve(struct ifnet *ifp, struct rtentry *rt, + struct mbuf *m, struct sockaddr *dst, u_char *desten, + struct llentry **lle); +void arp_ifinit(struct ifnet *, struct ifaddr *); +void arp_ifinit2(struct ifnet *, struct ifaddr *, u_char *); +#endif + +#endif diff --git a/freebsd/sys/netinet/igmp.c b/freebsd/sys/netinet/igmp.c index 5f8893d7..c41b8f71 100644 --- a/freebsd/sys/netinet/igmp.c +++ b/freebsd/sys/netinet/igmp.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2007-2009 Bruce Simpson. @@ -49,37 +49,37 @@ * MULTICAST Revision: 3.5.1.4 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/ktr.h> -#include <freebsd/sys/condvar.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/igmp.h> -#include <freebsd/netinet/igmp_var.h> - -#include <freebsd/machine/in_cksum.h> - -#include <freebsd/security/mac/mac_framework.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/module.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/protosw.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/ktr.h> +#include <sys/condvar.h> + +#include <net/if.h> +#include <net/netisr.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/igmp.h> +#include <netinet/igmp_var.h> + +#include <machine/in_cksum.h> + +#include <security/mac/mac_framework.h> #ifndef KTR_IGMPV3 #define KTR_IGMPV3 KTR_INET diff --git a/freebsd/sys/netinet/igmp.h b/freebsd/sys/netinet/igmp.h index f328d21f..8f574290 100644 --- a/freebsd/sys/netinet/igmp.h +++ b/freebsd/sys/netinet/igmp.h @@ -1,2 +1,148 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/igmp.h> +/*- + * Copyright (c) 1988 Stephen Deering. + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Stephen Deering of Stanford University. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)igmp.h 8.1 (Berkeley) 6/10/93 + * $FreeBSD$ + */ + +#ifndef _NETINET_IGMP_H_ +#define _NETINET_IGMP_H_ + +/* + * Internet Group Management Protocol (IGMP) definitions. + * + * Written by Steve Deering, Stanford, May 1988. + * + * MULTICAST Revision: 3.5.1.2 + */ + +/* Minimum length of any IGMP protocol message. */ +#define IGMP_MINLEN 8 + +/* + * IGMPv1/v2 query and host report format. + */ +struct igmp { + u_char igmp_type; /* version & type of IGMP message */ + u_char igmp_code; /* subtype for routing msgs */ + u_short igmp_cksum; /* IP-style checksum */ + struct in_addr igmp_group; /* group address being reported */ +}; /* (zero for queries) */ + +/* + * IGMP v3 query format. + */ +struct igmpv3 { + u_char igmp_type; /* version & type of IGMP message */ + u_char igmp_code; /* subtype for routing msgs */ + u_short igmp_cksum; /* IP-style checksum */ + struct in_addr igmp_group; /* group address being reported */ + /* (zero for queries) */ + u_char igmp_misc; /* reserved/suppress/robustness */ + u_char igmp_qqi; /* querier's query interval */ + u_short igmp_numsrc; /* number of sources */ + /*struct in_addr igmp_sources[1];*/ /* source addresses */ +}; +#define IGMP_V3_QUERY_MINLEN 12 +#define IGMP_EXP(x) (((x) >> 4) & 0x07) +#define IGMP_MANT(x) ((x) & 0x0f) +#define IGMP_QRESV(x) (((x) >> 4) & 0x0f) +#define IGMP_SFLAG(x) (((x) >> 3) & 0x01) +#define IGMP_QRV(x) ((x) & 0x07) + +struct igmp_grouprec { + u_char ig_type; /* record type */ + u_char ig_datalen; /* length of auxiliary data */ + u_short ig_numsrc; /* number of sources */ + struct in_addr ig_group; /* group address being reported */ + /*struct in_addr ig_sources[1];*/ /* source addresses */ +}; +#define IGMP_GRPREC_HDRLEN 8 + +/* + * IGMPv3 host membership report header. + */ +struct igmp_report { + u_char ir_type; /* IGMP_v3_HOST_MEMBERSHIP_REPORT */ + u_char ir_rsv1; /* must be zero */ + u_short ir_cksum; /* checksum */ + u_short ir_rsv2; /* must be zero */ + u_short ir_numgrps; /* number of group records */ + /*struct igmp_grouprec ir_groups[1];*/ /* group records */ +}; +#define IGMP_V3_REPORT_MINLEN 8 +#define IGMP_V3_REPORT_MAXRECS 65535 + +/* + * Message types, including version number. + */ +#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* membership query */ +#define IGMP_v1_HOST_MEMBERSHIP_REPORT 0x12 /* Ver. 1 membership report */ +#define IGMP_DVMRP 0x13 /* DVMRP routing message */ +#define IGMP_PIM 0x14 /* PIMv1 message (historic) */ +#define IGMP_v2_HOST_MEMBERSHIP_REPORT 0x16 /* Ver. 2 membership report */ +#define IGMP_HOST_LEAVE_MESSAGE 0x17 /* Leave-group message */ +#define IGMP_MTRACE_REPLY 0x1e /* mtrace(8) reply */ +#define IGMP_MTRACE_QUERY 0x1f /* mtrace(8) probe */ +#define IGMP_v3_HOST_MEMBERSHIP_REPORT 0x22 /* Ver. 3 membership report */ + +/* + * IGMPv3 report modes. + */ +#define IGMP_DO_NOTHING 0 /* don't send a record */ +#define IGMP_MODE_IS_INCLUDE 1 /* MODE_IN */ +#define IGMP_MODE_IS_EXCLUDE 2 /* MODE_EX */ +#define IGMP_CHANGE_TO_INCLUDE_MODE 3 /* TO_IN */ +#define IGMP_CHANGE_TO_EXCLUDE_MODE 4 /* TO_EX */ +#define IGMP_ALLOW_NEW_SOURCES 5 /* ALLOW_NEW */ +#define IGMP_BLOCK_OLD_SOURCES 6 /* BLOCK_OLD */ + +/* + * IGMPv3 query types. + */ +#define IGMP_V3_GENERAL_QUERY 1 +#define IGMP_V3_GROUP_QUERY 2 +#define IGMP_V3_GROUP_SOURCE_QUERY 3 + +/* + * Maximum report interval for IGMP v1/v2 host membership reports [RFC 1112] + */ +#define IGMP_V1V2_MAX_RI 10 +#define IGMP_MAX_HOST_REPORT_DELAY IGMP_V1V2_MAX_RI + +/* + * IGMP_TIMER_SCALE denotes that the igmp code field specifies + * time in tenths of a second. + */ +#define IGMP_TIMER_SCALE 10 + +#endif /* _NETINET_IGMP_H_ */ diff --git a/freebsd/sys/netinet/igmp_var.h b/freebsd/sys/netinet/igmp_var.h index e1abe6ab..ca17158f 100644 --- a/freebsd/sys/netinet/igmp_var.h +++ b/freebsd/sys/netinet/igmp_var.h @@ -34,8 +34,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_IGMP_VAR_HH_ -#define _NETINET_IGMP_VAR_HH_ +#ifndef _NETINET_IGMP_VAR_H_ +#define _NETINET_IGMP_VAR_H_ /* * Internet Group Management Protocol (IGMP), diff --git a/freebsd/sys/netinet/in.c b/freebsd/sys/netinet/in.c index 64e5d329..b9231e13 100644 --- a/freebsd/sys/netinet/in.c +++ b/freebsd/sys/netinet/in.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1991, 1993 @@ -32,38 +32,38 @@ * @(#)in.c 8.4 (Berkeley) 1/9/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_mpath.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/sockio.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_var.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/if_llatbl.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/igmp_var.h> -#include <freebsd/netinet/udp.h> -#include <freebsd/netinet/udp_var.h> +#include <rtems/bsd/local/opt_mpath.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/sockio.h> +#include <sys/malloc.h> +#include <sys/priv.h> +#include <sys/socket.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <sys/proc.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> + +#include <net/if.h> +#include <net/if_var.h> +#include <net/if_dl.h> +#include <net/if_llatbl.h> +#include <net/if_types.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/igmp_var.h> +#include <netinet/udp.h> +#include <netinet/udp_var.h> static int in_mask2len(struct in_addr *); static void in_len2mask(struct in_addr *, int); @@ -1309,8 +1309,8 @@ in_purgemaddrs(struct ifnet *ifp) IN_MULTI_UNLOCK(); } -#include <freebsd/net/if_dl.h> -#include <freebsd/netinet/if_ether.h> +#include <net/if_dl.h> +#include <netinet/if_ether.h> struct in_llentry { struct llentry base; diff --git a/freebsd/sys/netinet/in.h b/freebsd/sys/netinet/in.h index 73c7ca1a..f38aaee2 100644 --- a/freebsd/sys/netinet/in.h +++ b/freebsd/sys/netinet/in.h @@ -1,2 +1,794 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/in.h> +/*- + * Copyright (c) 1982, 1986, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)in.h 8.3 (Berkeley) 1/3/94 + * $FreeBSD$ + */ + +#ifndef _NETINET_IN_H_ +#define _NETINET_IN_H_ + +#include <sys/cdefs.h> +#include <rtems/bsd/sys/_types.h> +#include <machine/rtems-bsd-endian.h> + +/* Protocols common to RFC 1700, POSIX, and X/Open. */ +#define IPPROTO_IP 0 /* dummy for IP */ +#define IPPROTO_ICMP 1 /* control message protocol */ +#define IPPROTO_TCP 6 /* tcp */ +#define IPPROTO_UDP 17 /* user datagram protocol */ + +#define INADDR_ANY (u_int32_t)0x00000000 +#define INADDR_BROADCAST (u_int32_t)0xffffffff /* must be masked */ + +#ifndef _UINT8_T_DECLARED +typedef __uint8_t uint8_t; +#define _UINT8_T_DECLARED +#endif + +#ifndef _UINT16_T_DECLARED +typedef __uint16_t uint16_t; +#define _UINT16_T_DECLARED +#endif + +#ifndef _UINT32_T_DECLARED +typedef __uint32_t uint32_t; +#define _UINT32_T_DECLARED +#endif + +#ifndef _IN_ADDR_T_DECLARED +typedef uint32_t in_addr_t; +#define _IN_ADDR_T_DECLARED +#endif + +#ifndef _IN_PORT_T_DECLARED +typedef uint16_t in_port_t; +#define _IN_PORT_T_DECLARED +#endif + +#ifndef _SA_FAMILY_T_DECLARED +typedef __sa_family_t sa_family_t; +#define _SA_FAMILY_T_DECLARED +#endif + +/* Internet address (a structure for historical reasons). */ +#ifndef _STRUCT_IN_ADDR_DECLARED +struct in_addr { + in_addr_t s_addr; +}; +#define _STRUCT_IN_ADDR_DECLARED +#endif + +#ifndef _SOCKLEN_T_DECLARED +typedef __socklen_t socklen_t; +#define _SOCKLEN_T_DECLARED +#endif + +/* Avoid collision with original definition in sys/socket.h. */ +#ifndef _STRUCT_SOCKADDR_STORAGE_DECLARED +/* + * RFC 2553: protocol-independent placeholder for socket addresses + */ +#define _SS_MAXSIZE 128U +#define _SS_ALIGNSIZE (sizeof(__int64_t)) +#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - \ + sizeof(sa_family_t)) +#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - \ + sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE) + +struct sockaddr_storage { + unsigned char ss_len; /* address length */ + sa_family_t ss_family; /* address family */ + char __ss_pad1[_SS_PAD1SIZE]; + __int64_t __ss_align; /* force desired struct alignment */ + char __ss_pad2[_SS_PAD2SIZE]; +}; +#define _STRUCT_SOCKADDR_STORAGE_DECLARED +#endif + +/* Socket address, internet style. */ +struct sockaddr_in { + uint8_t sin_len; + sa_family_t sin_family; + in_port_t sin_port; + struct in_addr sin_addr; + char sin_zero[8]; +}; + +#if !defined(_KERNEL) && __BSD_VISIBLE + +#ifndef _BYTEORDER_PROTOTYPED +#define _BYTEORDER_PROTOTYPED +__BEGIN_DECLS +uint32_t htonl(uint32_t); +uint16_t htons(uint16_t); +uint32_t ntohl(uint32_t); +uint16_t ntohs(uint16_t); +__END_DECLS +#endif + +#ifndef _BYTEORDER_FUNC_DEFINED +#define _BYTEORDER_FUNC_DEFINED +#define htonl(x) __htonl(x) +#define htons(x) __htons(x) +#define ntohl(x) __ntohl(x) +#define ntohs(x) __ntohs(x) +#endif + +#endif /* !_KERNEL && __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200112 +#define IPPROTO_RAW 255 /* raw IP packet */ +#define INET_ADDRSTRLEN 16 +#endif + +#if __BSD_VISIBLE +/* + * Constants and structures defined by the internet system, + * Per RFC 790, September 1981, and numerous additions. + */ + +/* + * Protocols (RFC 1700) + */ +#define IPPROTO_HOPOPTS 0 /* IP6 hop-by-hop options */ +#define IPPROTO_IGMP 2 /* group mgmt protocol */ +#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */ +#define IPPROTO_IPV4 4 /* IPv4 encapsulation */ +#define IPPROTO_IPIP IPPROTO_IPV4 /* for compatibility */ +#define IPPROTO_ST 7 /* Stream protocol II */ +#define IPPROTO_EGP 8 /* exterior gateway protocol */ +#define IPPROTO_PIGP 9 /* private interior gateway */ +#define IPPROTO_RCCMON 10 /* BBN RCC Monitoring */ +#define IPPROTO_NVPII 11 /* network voice protocol*/ +#define IPPROTO_PUP 12 /* pup */ +#define IPPROTO_ARGUS 13 /* Argus */ +#define IPPROTO_EMCON 14 /* EMCON */ +#define IPPROTO_XNET 15 /* Cross Net Debugger */ +#define IPPROTO_CHAOS 16 /* Chaos*/ +#define IPPROTO_MUX 18 /* Multiplexing */ +#define IPPROTO_MEAS 19 /* DCN Measurement Subsystems */ +#define IPPROTO_HMP 20 /* Host Monitoring */ +#define IPPROTO_PRM 21 /* Packet Radio Measurement */ +#define IPPROTO_IDP 22 /* xns idp */ +#define IPPROTO_TRUNK1 23 /* Trunk-1 */ +#define IPPROTO_TRUNK2 24 /* Trunk-2 */ +#define IPPROTO_LEAF1 25 /* Leaf-1 */ +#define IPPROTO_LEAF2 26 /* Leaf-2 */ +#define IPPROTO_RDP 27 /* Reliable Data */ +#define IPPROTO_IRTP 28 /* Reliable Transaction */ +#define IPPROTO_TP 29 /* tp-4 w/ class negotiation */ +#define IPPROTO_BLT 30 /* Bulk Data Transfer */ +#define IPPROTO_NSP 31 /* Network Services */ +#define IPPROTO_INP 32 /* Merit Internodal */ +#define IPPROTO_SEP 33 /* Sequential Exchange */ +#define IPPROTO_3PC 34 /* Third Party Connect */ +#define IPPROTO_IDPR 35 /* InterDomain Policy Routing */ +#define IPPROTO_XTP 36 /* XTP */ +#define IPPROTO_DDP 37 /* Datagram Delivery */ +#define IPPROTO_CMTP 38 /* Control Message Transport */ +#define IPPROTO_TPXX 39 /* TP++ Transport */ +#define IPPROTO_IL 40 /* IL transport protocol */ +#define IPPROTO_IPV6 41 /* IP6 header */ +#define IPPROTO_SDRP 42 /* Source Demand Routing */ +#define IPPROTO_ROUTING 43 /* IP6 routing header */ +#define IPPROTO_FRAGMENT 44 /* IP6 fragmentation header */ +#define IPPROTO_IDRP 45 /* InterDomain Routing*/ +#define IPPROTO_RSVP 46 /* resource reservation */ +#define IPPROTO_GRE 47 /* General Routing Encap. */ +#define IPPROTO_MHRP 48 /* Mobile Host Routing */ +#define IPPROTO_BHA 49 /* BHA */ +#define IPPROTO_ESP 50 /* IP6 Encap Sec. Payload */ +#define IPPROTO_AH 51 /* IP6 Auth Header */ +#define IPPROTO_INLSP 52 /* Integ. Net Layer Security */ +#define IPPROTO_SWIPE 53 /* IP with encryption */ +#define IPPROTO_NHRP 54 /* Next Hop Resolution */ +#define IPPROTO_MOBILE 55 /* IP Mobility */ +#define IPPROTO_TLSP 56 /* Transport Layer Security */ +#define IPPROTO_SKIP 57 /* SKIP */ +#define IPPROTO_ICMPV6 58 /* ICMP6 */ +#define IPPROTO_NONE 59 /* IP6 no next header */ +#define IPPROTO_DSTOPTS 60 /* IP6 destination option */ +#define IPPROTO_AHIP 61 /* any host internal protocol */ +#define IPPROTO_CFTP 62 /* CFTP */ +#define IPPROTO_HELLO 63 /* "hello" routing protocol */ +#define IPPROTO_SATEXPAK 64 /* SATNET/Backroom EXPAK */ +#define IPPROTO_KRYPTOLAN 65 /* Kryptolan */ +#define IPPROTO_RVD 66 /* Remote Virtual Disk */ +#define IPPROTO_IPPC 67 /* Pluribus Packet Core */ +#define IPPROTO_ADFS 68 /* Any distributed FS */ +#define IPPROTO_SATMON 69 /* Satnet Monitoring */ +#define IPPROTO_VISA 70 /* VISA Protocol */ +#define IPPROTO_IPCV 71 /* Packet Core Utility */ +#define IPPROTO_CPNX 72 /* Comp. Prot. Net. Executive */ +#define IPPROTO_CPHB 73 /* Comp. Prot. HeartBeat */ +#define IPPROTO_WSN 74 /* Wang Span Network */ +#define IPPROTO_PVP 75 /* Packet Video Protocol */ +#define IPPROTO_BRSATMON 76 /* BackRoom SATNET Monitoring */ +#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */ +#define IPPROTO_WBMON 78 /* WIDEBAND Monitoring */ +#define IPPROTO_WBEXPAK 79 /* WIDEBAND EXPAK */ +#define IPPROTO_EON 80 /* ISO cnlp */ +#define IPPROTO_VMTP 81 /* VMTP */ +#define IPPROTO_SVMTP 82 /* Secure VMTP */ +#define IPPROTO_VINES 83 /* Banyon VINES */ +#define IPPROTO_TTP 84 /* TTP */ +#define IPPROTO_IGP 85 /* NSFNET-IGP */ +#define IPPROTO_DGP 86 /* dissimilar gateway prot. */ +#define IPPROTO_TCF 87 /* TCF */ +#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */ +#define IPPROTO_OSPFIGP 89 /* OSPFIGP */ +#define IPPROTO_SRPC 90 /* Strite RPC protocol */ +#define IPPROTO_LARP 91 /* Locus Address Resoloution */ +#define IPPROTO_MTP 92 /* Multicast Transport */ +#define IPPROTO_AX25 93 /* AX.25 Frames */ +#define IPPROTO_IPEIP 94 /* IP encapsulated in IP */ +#define IPPROTO_MICP 95 /* Mobile Int.ing control */ +#define IPPROTO_SCCSP 96 /* Semaphore Comm. security */ +#define IPPROTO_ETHERIP 97 /* Ethernet IP encapsulation */ +#define IPPROTO_ENCAP 98 /* encapsulation header */ +#define IPPROTO_APES 99 /* any private encr. scheme */ +#define IPPROTO_GMTP 100 /* GMTP*/ +#define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */ +#define IPPROTO_SCTP 132 /* SCTP */ +/* 101-254: Partly Unassigned */ +#define IPPROTO_PIM 103 /* Protocol Independent Mcast */ +#define IPPROTO_CARP 112 /* CARP */ +#define IPPROTO_PGM 113 /* PGM */ +#define IPPROTO_PFSYNC 240 /* PFSYNC */ +/* 255: Reserved */ +/* BSD Private, local use, namespace incursion, no longer used */ +#define IPPROTO_OLD_DIVERT 254 /* OLD divert pseudo-proto */ +#define IPPROTO_MAX 256 + +/* last return value of *_input(), meaning "all job for this pkt is done". */ +#define IPPROTO_DONE 257 + +/* Only used internally, so can be outside the range of valid IP protocols. */ +#define IPPROTO_DIVERT 258 /* divert pseudo-protocol */ + +/* + * Defined to avoid confusion. The master value is defined by + * PROTO_SPACER in sys/protosw.h. + */ +#define IPPROTO_SPACER 32767 /* spacer for loadable protos */ + +/* + * Local port number conventions: + * + * When a user does a bind(2) or connect(2) with a port number of zero, + * a non-conflicting local port address is chosen. + * The default range is IPPORT_HIFIRSTAUTO through + * IPPORT_HILASTAUTO, although that is settable by sysctl. + * + * A user may set the IPPROTO_IP option IP_PORTRANGE to change this + * default assignment range. + * + * The value IP_PORTRANGE_DEFAULT causes the default behavior. + * + * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers + * into the "high" range. These are reserved for client outbound connections + * which do not want to be filtered by any firewalls. + * + * The value IP_PORTRANGE_LOW changes the range to the "low" are + * that is (by convention) restricted to privileged processes. This + * convention is based on "vouchsafe" principles only. It is only secure + * if you trust the remote host to restrict these ports. + * + * The default range of ports and the high range can be changed by + * sysctl(3). (net.inet.ip.port{hi,low}{first,last}_auto) + * + * Changing those values has bad security implications if you are + * using a stateless firewall that is allowing packets outside of that + * range in order to allow transparent outgoing connections. + * + * Such a firewall configuration will generally depend on the use of these + * default values. If you change them, you may find your Security + * Administrator looking for you with a heavy object. + * + * For a slightly more orthodox text view on this: + * + * ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers + * + * port numbers are divided into three ranges: + * + * 0 - 1023 Well Known Ports + * 1024 - 49151 Registered Ports + * 49152 - 65535 Dynamic and/or Private Ports + * + */ + +/* + * Ports < IPPORT_RESERVED are reserved for + * privileged processes (e.g. root). (IP_PORTRANGE_LOW) + */ +#define IPPORT_RESERVED 1024 + +/* + * Default local port range, used by IP_PORTRANGE_DEFAULT + */ +#define IPPORT_EPHEMERALFIRST 10000 +#define IPPORT_EPHEMERALLAST 65535 + +/* + * Dynamic port range, used by IP_PORTRANGE_HIGH. + */ +#define IPPORT_HIFIRSTAUTO 49152 +#define IPPORT_HILASTAUTO 65535 + +/* + * Scanning for a free reserved port return a value below IPPORT_RESERVED, + * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was + * 512, but that conflicts with some well-known-services that firewalls may + * have a fit if we use. + */ +#define IPPORT_RESERVEDSTART 600 + +#define IPPORT_MAX 65535 + +/* + * Definitions of bits in internet address integers. + * On subnets, the decomposition of addresses to host and net parts + * is done according to subnet mask, not the masks here. + */ +#define IN_CLASSA(i) (((u_int32_t)(i) & 0x80000000) == 0) +#define IN_CLASSA_NET 0xff000000 +#define IN_CLASSA_NSHIFT 24 +#define IN_CLASSA_HOST 0x00ffffff +#define IN_CLASSA_MAX 128 + +#define IN_CLASSB(i) (((u_int32_t)(i) & 0xc0000000) == 0x80000000) +#define IN_CLASSB_NET 0xffff0000 +#define IN_CLASSB_NSHIFT 16 +#define IN_CLASSB_HOST 0x0000ffff +#define IN_CLASSB_MAX 65536 + +#define IN_CLASSC(i) (((u_int32_t)(i) & 0xe0000000) == 0xc0000000) +#define IN_CLASSC_NET 0xffffff00 +#define IN_CLASSC_NSHIFT 8 +#define IN_CLASSC_HOST 0x000000ff + +#define IN_CLASSD(i) (((u_int32_t)(i) & 0xf0000000) == 0xe0000000) +#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */ +#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */ +#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */ +#define IN_MULTICAST(i) IN_CLASSD(i) + +#define IN_EXPERIMENTAL(i) (((u_int32_t)(i) & 0xf0000000) == 0xf0000000) +#define IN_BADCLASS(i) (((u_int32_t)(i) & 0xf0000000) == 0xf0000000) + +#define IN_LINKLOCAL(i) (((u_int32_t)(i) & 0xffff0000) == 0xa9fe0000) +#define IN_LOOPBACK(i) (((u_int32_t)(i) & 0xff000000) == 0x7f000000) +#define IN_ZERONET(i) (((u_int32_t)(i) & 0xff000000) == 0) + +#define IN_PRIVATE(i) ((((u_int32_t)(i) & 0xff000000) == 0x0a000000) || \ + (((u_int32_t)(i) & 0xfff00000) == 0xac100000) || \ + (((u_int32_t)(i) & 0xffff0000) == 0xc0a80000)) + +#define IN_LOCAL_GROUP(i) (((u_int32_t)(i) & 0xffffff00) == 0xe0000000) + +#define IN_ANY_LOCAL(i) (IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i)) + +#define INADDR_LOOPBACK (u_int32_t)0x7f000001 +#ifndef _KERNEL +#define INADDR_NONE 0xffffffff /* -1 return */ +#endif + +#define INADDR_UNSPEC_GROUP (u_int32_t)0xe0000000 /* 224.0.0.0 */ +#define INADDR_ALLHOSTS_GROUP (u_int32_t)0xe0000001 /* 224.0.0.1 */ +#define INADDR_ALLRTRS_GROUP (u_int32_t)0xe0000002 /* 224.0.0.2 */ +#define INADDR_ALLRPTS_GROUP (u_int32_t)0xe0000016 /* 224.0.0.22, IGMPv3 */ +#define INADDR_CARP_GROUP (u_int32_t)0xe0000012 /* 224.0.0.18 */ +#define INADDR_PFSYNC_GROUP (u_int32_t)0xe00000f0 /* 224.0.0.240 */ +#define INADDR_ALLMDNS_GROUP (u_int32_t)0xe00000fb /* 224.0.0.251 */ +#define INADDR_MAX_LOCAL_GROUP (u_int32_t)0xe00000ff /* 224.0.0.255 */ + +#define IN_LOOPBACKNET 127 /* official! */ + +/* + * Options for use with [gs]etsockopt at the IP level. + * First word of comment is data type; bool is stored in int. + */ +#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */ +#define IP_HDRINCL 2 /* int; header is included with data */ +#define IP_TOS 3 /* int; IP type of service and preced. */ +#define IP_TTL 4 /* int; IP time to live */ +#define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */ +#define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */ +#define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */ +#define IP_SENDSRCADDR IP_RECVDSTADDR /* cmsg_type to set src addr */ +#define IP_RETOPTS 8 /* ip_opts; set/get IP options */ +#define IP_MULTICAST_IF 9 /* struct in_addr *or* struct ip_mreqn; + * set/get IP multicast i/f */ +#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */ +#define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */ +#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ +#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ +#define IP_MULTICAST_VIF 14 /* set/get IP mcast virt. iface */ +#define IP_RSVP_ON 15 /* enable RSVP in kernel */ +#define IP_RSVP_OFF 16 /* disable RSVP in kernel */ +#define IP_RSVP_VIF_ON 17 /* set RSVP per-vif socket */ +#define IP_RSVP_VIF_OFF 18 /* unset RSVP per-vif socket */ +#define IP_PORTRANGE 19 /* int; range to choose for unspec port */ +#define IP_RECVIF 20 /* bool; receive reception if w/dgram */ +/* for IPSEC */ +#define IP_IPSEC_POLICY 21 /* int; set/get security policy */ +#define IP_FAITH 22 /* bool; accept FAITH'ed connections */ + +#define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ +#define IP_BINDANY 24 /* bool: allow bind to any address */ + +/* + * Options for controlling the firewall and dummynet. + * Historical options (from 40 to 64) will eventually be + * replaced by only two options, IP_FW3 and IP_DUMMYNET3. + */ +#define IP_FW_TABLE_ADD 40 /* add entry */ +#define IP_FW_TABLE_DEL 41 /* delete entry */ +#define IP_FW_TABLE_FLUSH 42 /* flush table */ +#define IP_FW_TABLE_GETSIZE 43 /* get table size */ +#define IP_FW_TABLE_LIST 44 /* list table contents */ + +#define IP_FW3 48 /* generic ipfw v.3 sockopts */ +#define IP_DUMMYNET3 49 /* generic dummynet v.3 sockopts */ + +#define IP_FW_ADD 50 /* add a firewall rule to chain */ +#define IP_FW_DEL 51 /* delete a firewall rule from chain */ +#define IP_FW_FLUSH 52 /* flush firewall rule chain */ +#define IP_FW_ZERO 53 /* clear single/all firewall counter(s) */ +#define IP_FW_GET 54 /* get entire firewall rule chain */ +#define IP_FW_RESETLOG 55 /* reset logging counters */ + +#define IP_FW_NAT_CFG 56 /* add/config a nat rule */ +#define IP_FW_NAT_DEL 57 /* delete a nat rule */ +#define IP_FW_NAT_GET_CONFIG 58 /* get configuration of a nat rule */ +#define IP_FW_NAT_GET_LOG 59 /* get log of a nat rule */ + +#define IP_DUMMYNET_CONFIGURE 60 /* add/configure a dummynet pipe */ +#define IP_DUMMYNET_DEL 61 /* delete a dummynet pipe from chain */ +#define IP_DUMMYNET_FLUSH 62 /* flush dummynet */ +#define IP_DUMMYNET_GET 64 /* get entire dummynet pipes */ + +#define IP_RECVTTL 65 /* bool; receive IP TTL w/dgram */ +#define IP_MINTTL 66 /* minimum TTL for packet or drop */ +#define IP_DONTFRAG 67 /* don't fragment packet */ + +/* IPv4 Source Filter Multicast API [RFC3678] */ +#define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */ +#define IP_DROP_SOURCE_MEMBERSHIP 71 /* drop a single source */ +#define IP_BLOCK_SOURCE 72 /* block a source */ +#define IP_UNBLOCK_SOURCE 73 /* unblock a source */ + +/* The following option is private; do not use it from user applications. */ +#define IP_MSFILTER 74 /* set/get filter list */ + +/* Protocol Independent Multicast API [RFC3678] */ +#define MCAST_JOIN_GROUP 80 /* join an any-source group */ +#define MCAST_LEAVE_GROUP 81 /* leave all sources for group */ +#define MCAST_JOIN_SOURCE_GROUP 82 /* join a source-specific group */ +#define MCAST_LEAVE_SOURCE_GROUP 83 /* leave a single source */ +#define MCAST_BLOCK_SOURCE 84 /* block a source */ +#define MCAST_UNBLOCK_SOURCE 85 /* unblock a source */ + +/* + * Defaults and limits for options + */ +#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ +#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ + +/* + * The imo_membership vector for each socket is now dynamically allocated at + * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized + * according to a power-of-two increment. + */ +#define IP_MIN_MEMBERSHIPS 31 +#define IP_MAX_MEMBERSHIPS 4095 +#define IP_MAX_SOURCE_FILTER 1024 /* XXX to be unused */ + +/* + * Default resource limits for IPv4 multicast source filtering. + * These may be modified by sysctl. + */ +#define IP_MAX_GROUP_SRC_FILTER 512 /* sources per group */ +#define IP_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ +#define IP_MAX_SOCK_MUTE_FILTER 128 /* XXX no longer used */ + +/* + * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. + */ +struct ip_mreq { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_interface; /* local IP address of interface */ +}; + +/* + * Modified argument structure for IP_MULTICAST_IF, obtained from Linux. + * This is used to specify an interface index for multicast sends, as + * the IPv4 legacy APIs do not support this (unless IP_SENDIF is available). + */ +struct ip_mreqn { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_address; /* local IP address of interface */ + int imr_ifindex; /* Interface index; cast to uint32_t */ +}; + +/* + * Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] + */ +struct ip_mreq_source { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_sourceaddr; /* IP address of source */ + struct in_addr imr_interface; /* local IP address of interface */ +}; + +/* + * Argument structures for Protocol-Independent Multicast Source + * Filter APIs. [RFC3678] + */ +struct group_req { + uint32_t gr_interface; /* interface index */ + struct sockaddr_storage gr_group; /* group address */ +}; + +struct group_source_req { + uint32_t gsr_interface; /* interface index */ + struct sockaddr_storage gsr_group; /* group address */ + struct sockaddr_storage gsr_source; /* source address */ +}; + +#ifndef __MSFILTERREQ_DEFINED +#define __MSFILTERREQ_DEFINED +/* + * The following structure is private; do not use it from user applications. + * It is used to communicate IP_MSFILTER/IPV6_MSFILTER information between + * the RFC 3678 libc functions and the kernel. + */ +struct __msfilterreq { + uint32_t msfr_ifindex; /* interface index */ + uint32_t msfr_fmode; /* filter mode for group */ + uint32_t msfr_nsrcs; /* # of sources in msfr_srcs */ + struct sockaddr_storage msfr_group; /* group address */ + struct sockaddr_storage *msfr_srcs; /* pointer to the first member + * of a contiguous array of + * sources to filter in full. + */ +}; +#endif + +struct sockaddr; + +/* + * Advanced (Full-state) APIs [RFC3678] + * The RFC specifies uint_t for the 6th argument to [sg]etsourcefilter(). + * We use uint32_t here to be consistent. + */ +int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t, + uint32_t, struct in_addr *); +int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *, + uint32_t *, struct in_addr *); +int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, + uint32_t, uint32_t, struct sockaddr_storage *); +int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, + uint32_t *, uint32_t *, struct sockaddr_storage *); + +/* + * Filter modes; also used to represent per-socket filter mode internally. + */ +#define MCAST_UNDEFINED 0 /* fmode: not yet defined */ +#define MCAST_INCLUDE 1 /* fmode: include these source(s) */ +#define MCAST_EXCLUDE 2 /* fmode: exclude these source(s) */ + +/* + * Argument for IP_PORTRANGE: + * - which range to search when port is unspecified at bind() or connect() + */ +#define IP_PORTRANGE_DEFAULT 0 /* default range */ +#define IP_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ +#define IP_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ + +/* + * Definitions for inet sysctl operations. + * + * Third level is protocol number. + * Fourth level is desired variable within that protocol. + */ +#define IPPROTO_MAXID (IPPROTO_AH + 1) /* don't list to IPPROTO_MAX */ + +#define CTL_IPPROTO_NAMES { \ + { "ip", CTLTYPE_NODE }, \ + { "icmp", CTLTYPE_NODE }, \ + { "igmp", CTLTYPE_NODE }, \ + { "ggp", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { "tcp", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { "egp", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { "pup", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { "udp", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { "idp", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { "ipsec", CTLTYPE_NODE }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { 0, 0 }, \ + { "pim", CTLTYPE_NODE }, \ +} + +/* + * Names for IP sysctl objects + */ +#define IPCTL_FORWARDING 1 /* act as router */ +#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ +#define IPCTL_DEFTTL 3 /* default TTL */ +#ifdef notyet +#define IPCTL_DEFMTU 4 /* default MTU */ +#endif +#define IPCTL_RTEXPIRE 5 /* cloned route expiration time */ +#define IPCTL_RTMINEXPIRE 6 /* min value for expiration time */ +#define IPCTL_RTMAXCACHE 7 /* trigger level for dynamic expire */ +#define IPCTL_SOURCEROUTE 8 /* may perform source routes */ +#define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */ +#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */ +#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */ +#define IPCTL_STATS 12 /* ipstat structure */ +#define IPCTL_ACCEPTSOURCEROUTE 13 /* may accept source routed packets */ +#define IPCTL_FASTFORWARDING 14 /* use fast IP forwarding code */ +#define IPCTL_KEEPFAITH 15 /* FAITH IPv4->IPv6 translater ctl */ +#define IPCTL_GIF_TTL 16 /* default TTL for gif encap packet */ +#define IPCTL_MAXID 17 + +#define IPCTL_NAMES { \ + { 0, 0 }, \ + { "forwarding", CTLTYPE_INT }, \ + { "redirect", CTLTYPE_INT }, \ + { "ttl", CTLTYPE_INT }, \ + { "mtu", CTLTYPE_INT }, \ + { "rtexpire", CTLTYPE_INT }, \ + { "rtminexpire", CTLTYPE_INT }, \ + { "rtmaxcache", CTLTYPE_INT }, \ + { "sourceroute", CTLTYPE_INT }, \ + { "directed-broadcast", CTLTYPE_INT }, \ + { "intr-queue-maxlen", CTLTYPE_INT }, \ + { "intr-queue-drops", CTLTYPE_INT }, \ + { "stats", CTLTYPE_STRUCT }, \ + { "accept_sourceroute", CTLTYPE_INT }, \ + { "fastforwarding", CTLTYPE_INT }, \ +} + +#endif /* __BSD_VISIBLE */ + +#ifdef _KERNEL + +struct ifnet; struct mbuf; /* forward declarations for Standard C */ + +int in_broadcast(struct in_addr, struct ifnet *); +int in_canforward(struct in_addr); +int in_localaddr(struct in_addr); +int in_localip(struct in_addr); +int inet_aton(const char *, struct in_addr *); /* in libkern */ +char *inet_ntoa(struct in_addr); /* in libkern */ +char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */ +char *inet_ntop(int, const void *, char *, socklen_t); /* in libkern */ +int inet_pton(int af, const char *, void *); /* in libkern */ +void in_ifdetach(struct ifnet *); + +#define in_hosteq(s, t) ((s).s_addr == (t).s_addr) +#define in_nullhost(x) ((x).s_addr == INADDR_ANY) +#define in_allhosts(x) ((x).s_addr == htonl(INADDR_ALLHOSTS_GROUP)) + +#define satosin(sa) ((struct sockaddr_in *)(sa)) +#define sintosa(sin) ((struct sockaddr *)(sin)) +#define ifatoia(ifa) ((struct in_ifaddr *)(ifa)) + +/* + * Historically, BSD keeps ip_len and ip_off in host format + * when doing layer 3 processing, and this often requires + * to translate the format back and forth. + * To make the process explicit, we define a couple of macros + * that also take into account the fact that at some point + * we may want to keep those fields always in net format. + */ + +#if (BYTE_ORDER == BIG_ENDIAN) || defined(HAVE_NET_IPLEN) +#define SET_NET_IPLEN(p) do {} while (0) +#define SET_HOST_IPLEN(p) do {} while (0) +#else +#define SET_NET_IPLEN(p) do { \ + struct ip *h_ip = (p); \ + h_ip->ip_len = htons(h_ip->ip_len); \ + h_ip->ip_off = htons(h_ip->ip_off); \ + } while (0) + +#define SET_HOST_IPLEN(p) do { \ + struct ip *h_ip = (p); \ + h_ip->ip_len = ntohs(h_ip->ip_len); \ + h_ip->ip_off = ntohs(h_ip->ip_off); \ + } while (0) +#endif /* !HAVE_NET_IPLEN */ + +#endif /* _KERNEL */ + +/* INET6 stuff */ +#if __POSIX_VISIBLE >= 200112 +#define __KAME_NETINET_IN_HH_INCLUDED_ +#include <netinet6/in6.h> +#undef __KAME_NETINET_IN_HH_INCLUDED_ +#endif + +#endif /* !_NETINET_IN_H_*/ diff --git a/freebsd/sys/netinet/in_gif.c b/freebsd/sys/netinet/in_gif.c index 3613e214..12faa528 100644 --- a/freebsd/sys/netinet/in_gif.c +++ b/freebsd/sys/netinet/in_gif.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* $KAME: in_gif.c,v 1.54 2001/05/14 14:02:16 itojun Exp $ */ @@ -31,46 +31,46 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_mrouting.h> -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/sockio.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/errno.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/malloc.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/in_gif.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_encap.h> -#include <freebsd/netinet/ip_ecn.h> +#include <rtems/bsd/local/opt_mrouting.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/socket.h> +#include <sys/sockio.h> +#include <sys/mbuf.h> +#include <rtems/bsd/sys/errno.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/protosw.h> +#include <sys/malloc.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/in_gif.h> +#include <netinet/in_var.h> +#include <netinet/ip_encap.h> +#include <netinet/ip_ecn.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif #ifdef MROUTING -#include <freebsd/netinet/ip_mroute.h> +#include <netinet/ip_mroute.h> #endif /* MROUTING */ -#include <freebsd/net/if_gif.h> +#include <net/if_gif.h> static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); diff --git a/freebsd/sys/netinet/in_gif.h b/freebsd/sys/netinet/in_gif.h index 1e42b01f..e1f4ae48 100644 --- a/freebsd/sys/netinet/in_gif.h +++ b/freebsd/sys/netinet/in_gif.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef _NETINET_IN_GIF_HH_ -#define _NETINET_IN_GIF_HH_ +#ifndef _NETINET_IN_GIF_H_ +#define _NETINET_IN_GIF_H_ #define GIF_TTL 30 @@ -42,4 +42,4 @@ int gif_encapcheck4(const struct mbuf *, int, int, void *); int in_gif_attach(struct gif_softc *); int in_gif_detach(struct gif_softc *); -#endif /*_NETINET_IN_GIF_HH_*/ +#endif /*_NETINET_IN_GIF_H_*/ diff --git a/freebsd/sys/netinet/in_mcast.c b/freebsd/sys/netinet/in_mcast.c index ed2bcc12..d6a316a5 100644 --- a/freebsd/sys/netinet/in_mcast.c +++ b/freebsd/sys/netinet/in_mcast.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2007-2009 Bruce Simpson. @@ -34,33 +34,33 @@ * IPv4 multicast socket, group, and socket option processing module. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/ktr.h> -#include <freebsd/sys/tree.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/igmp_var.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/protosw.h> +#include <sys/sysctl.h> +#include <sys/ktr.h> +#include <sys/tree.h> + +#include <net/if.h> +#include <net/if_dl.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_pcb.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> +#include <netinet/igmp_var.h> #ifndef KTR_IGMPV3 #define KTR_IGMPV3 KTR_INET diff --git a/freebsd/sys/netinet/in_pcb.c b/freebsd/sys/netinet/in_pcb.c index 186a0f0a..9fd9536e 100644 --- a/freebsd/sys/netinet/in_pcb.c +++ b/freebsd/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1991, 1993, 1995 @@ -33,57 +33,57 @@ * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ddb.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/local/opt_ddb.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/domain.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> #ifdef DDB -#include <freebsd/ddb/ddb.h> +#include <ddb/ddb.h> #endif -#include <freebsd/vm/uma.h> +#include <vm/uma.h> -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> +#include <net/if.h> +#include <net/if_types.h> +#include <net/route.h> +#include <net/vnet.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/udp.h> -#include <freebsd/netinet/udp_var.h> +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> +#include <netinet/tcp_var.h> +#include <netinet/udp.h> +#include <netinet/udp_var.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/ip6_var.h> +#include <netinet/ip6.h> +#include <netinet6/ip6_var.h> #endif /* INET6 */ #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/key.h> +#include <netipsec/ipsec.h> +#include <netipsec/key.h> #endif /* IPSEC */ -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> /* * These configure the range of local port addresses assigned to diff --git a/freebsd/sys/netinet/in_pcb.h b/freebsd/sys/netinet/in_pcb.h index 8cd4a5f8..334537d7 100644 --- a/freebsd/sys/netinet/in_pcb.h +++ b/freebsd/sys/netinet/in_pcb.h @@ -31,17 +31,17 @@ * $FreeBSD$ */ -#ifndef _NETINET_IN_PCB_HH_ -#define _NETINET_IN_PCB_HH_ +#ifndef _NETINET_IN_PCB_H_ +#define _NETINET_IN_PCB_H_ -#include <freebsd/sys/queue.h> -#include <freebsd/sys/_lock.h> -#include <freebsd/sys/_mutex.h> -#include <freebsd/sys/_rwlock.h> +#include <sys/queue.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> +#include <sys/_rwlock.h> #ifdef _KERNEL -#include <freebsd/sys/rwlock.h> -#include <freebsd/net/vnet.h> +#include <sys/rwlock.h> +#include <net/vnet.h> #endif #define in6pcb inpcb /* for KAME src sync over BSD*'s */ @@ -237,7 +237,7 @@ struct inpcb { * Interface exported to userland by various protocols which use inpcbs. Hack * alert -- only define if struct xsocket is in scope. */ -#ifdef _SYS_SOCKETVAR_HH_ +#ifdef _SYS_SOCKETVAR_H_ struct xinpcb { size_t xi_len; /* length of this structure */ struct inpcb xi_inp; @@ -251,7 +251,7 @@ struct xinpgen { inp_gen_t xig_gen; /* generation count at this time */ so_gen_t xig_sogen; /* socket generation count at this time */ }; -#endif /* _SYS_SOCKETVAR_HH_ */ +#endif /* _SYS_SOCKETVAR_H_ */ struct inpcbport { LIST_ENTRY(inpcbport) phd_hash; @@ -522,4 +522,4 @@ void in_pcbsosetlabel(struct socket *so); void ipport_tick(void *xtp); #endif /* _KERNEL */ -#endif /* !_NETINET_IN_PCB_HH_ */ +#endif /* !_NETINET_IN_PCB_H_ */ diff --git a/freebsd/sys/netinet/in_proto.c b/freebsd/sys/netinet/in_proto.c index 9be0b626..db25a54d 100644 --- a/freebsd/sys/netinet/in_proto.c +++ b/freebsd/sys/netinet/in_proto.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1993 @@ -31,47 +31,47 @@ * @(#)in_proto.c 8.2 (Berkeley) 2/9/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipx.h> -#include <freebsd/local/opt_mrouting.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_pf.h> -#include <freebsd/local/opt_sctp.h> -#include <freebsd/local/opt_mpath.h> +#include <rtems/bsd/local/opt_ipx.h> +#include <rtems/bsd/local/opt_mrouting.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_pf.h> +#include <rtems/bsd/local/opt_sctp.h> +#include <rtems/bsd/local/opt_mpath.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/queue.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/socket.h> +#include <sys/domain.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/queue.h> +#include <sys/sysctl.h> -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> +#include <net/if.h> +#include <net/route.h> #ifdef RADIX_MPATH -#include <freebsd/net/radix_mpath.h> +#include <net/radix_mpath.h> #endif -#include <freebsd/net/vnet.h> +#include <net/vnet.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/igmp_var.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/udp.h> -#include <freebsd/netinet/udp_var.h> -#include <freebsd/netinet/ip_encap.h> +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_icmp.h> +#include <netinet/igmp_var.h> +#include <netinet/tcp.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/udp.h> +#include <netinet/udp_var.h> +#include <netinet/ip_encap.h> /* * TCP/IP protocol family: IP, ICMP, UDP, TCP. @@ -80,19 +80,19 @@ __FBSDID("$FreeBSD$"); static struct pr_usrreqs nousrreqs; #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> +#include <netipsec/ipsec.h> #endif /* IPSEC */ #ifdef SCTP -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_var.h> +#include <netinet/in_pcb.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp.h> +#include <netinet/sctp_var.h> #endif /* SCTP */ #ifdef DEV_PFSYNC -#include <freebsd/net/pfvar.h> -#include <freebsd/net/if_pfsync.h> +#include <net/pfvar.h> +#include <net/if_pfsync.h> #endif extern struct domain inetdomain; diff --git a/freebsd/sys/netinet/in_rmx.c b/freebsd/sys/netinet/in_rmx.c index 25f99ea0..dda56194 100644 --- a/freebsd/sys/netinet/in_rmx.c +++ b/freebsd/sys/netinet/in_rmx.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright 1994, 1995 Massachusetts Institute of Technology @@ -42,25 +42,25 @@ * indefinitely. See in_rtqtimo() below for the exact mechanism. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/callout.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/socket.h> +#include <sys/mbuf.h> +#include <sys/syslog.h> +#include <sys/callout.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> extern int in_inithead(void **head, int off); #ifdef VIMAGE diff --git a/freebsd/sys/netinet/in_systm.h b/freebsd/sys/netinet/in_systm.h index 68bb190e..4b34aa00 100644 --- a/freebsd/sys/netinet/in_systm.h +++ b/freebsd/sys/netinet/in_systm.h @@ -1,2 +1,58 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/in_systm.h> +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)in_systm.h 8.1 (Berkeley) 6/10/93 + * $FreeBSD$ + */ + +#ifndef _NETINET_IN_SYSTM_H_ +#define _NETINET_IN_SYSTM_H_ + +/* + * Miscellaneous internetwork + * definitions for kernel. + */ + +/* + * Network types. + * + * Internally the system keeps counters in the headers with the bytes + * swapped so that VAX instructions will work on them. It reverses + * the bytes before transmission at each protocol level. The n_ types + * represent the types with the bytes in ``high-ender'' order. + */ +typedef u_int16_t n_short; /* short as received from the net */ +typedef u_int32_t n_long; /* long as received from the net */ + +typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */ + +#ifdef _KERNEL +uint32_t iptime(void); +#endif + +#endif diff --git a/freebsd/sys/netinet/in_var.h b/freebsd/sys/netinet/in_var.h index c921ad31..cd1d9043 100644 --- a/freebsd/sys/netinet/in_var.h +++ b/freebsd/sys/netinet/in_var.h @@ -30,12 +30,12 @@ * $FreeBSD$ */ -#ifndef _NETINET_IN_VAR_HH_ -#define _NETINET_IN_VAR_HH_ +#ifndef _NETINET_IN_VAR_H_ +#define _NETINET_IN_VAR_H_ -#include <freebsd/sys/queue.h> -#include <freebsd/sys/fnv_hash.h> -#include <freebsd/sys/tree.h> +#include <sys/queue.h> +#include <sys/fnv_hash.h> +#include <sys/tree.h> struct igmp_ifinfo; struct in_multi; @@ -470,6 +470,6 @@ int in_rtrequest1(int, struct rt_addrinfo *, struct rtentry **, u_int); #endif /* _KERNEL */ /* INET6 stuff */ -#include <freebsd/netinet6/in6_var.h> +#include <netinet6/in6_var.h> -#endif /* _NETINET_IN_VAR_HH_ */ +#endif /* _NETINET_IN_VAR_H_ */ diff --git a/freebsd/sys/netinet/ip.h b/freebsd/sys/netinet/ip.h index 9d5d8a9c..daee533e 100644 --- a/freebsd/sys/netinet/ip.h +++ b/freebsd/sys/netinet/ip.h @@ -1,2 +1,196 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/ip.h> +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ip.h 8.2 (Berkeley) 6/1/94 + * $FreeBSD$ + */ + +#ifndef _NETINET_IP_H_ +#define _NETINET_IP_H_ + +#include <sys/cdefs.h> + +/* + * Definitions for internet protocol version 4. + * + * Per RFC 791, September 1981. + */ +#define IPVERSION 4 + +/* + * Structure of an internet header, naked of options. + */ +struct ip { +#if BYTE_ORDER == LITTLE_ENDIAN + u_int ip_hl:4, /* header length */ + ip_v:4; /* version */ +#endif +#if BYTE_ORDER == BIG_ENDIAN + u_int ip_v:4, /* version */ + ip_hl:4; /* header length */ +#endif + u_char ip_tos; /* type of service */ + u_short ip_len; /* total length */ + u_short ip_id; /* identification */ + u_short ip_off; /* fragment offset field */ +#define IP_RF 0x8000 /* reserved fragment flag */ +#define IP_DF 0x4000 /* dont fragment flag */ +#define IP_MF 0x2000 /* more fragments flag */ +#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ + u_char ip_ttl; /* time to live */ + u_char ip_p; /* protocol */ + u_short ip_sum; /* checksum */ + struct in_addr ip_src,ip_dst; /* source and dest address */ +} __packed __aligned(4); + +#define IP_MAXPACKET 65535 /* maximum packet size */ + +/* + * Definitions for IP type of service (ip_tos). + */ +#define IPTOS_LOWDELAY 0x10 +#define IPTOS_THROUGHPUT 0x08 +#define IPTOS_RELIABILITY 0x04 +#define IPTOS_MINCOST 0x02 + +/* + * Definitions for IP precedence (also in ip_tos) (hopefully unused). + */ +#define IPTOS_PREC_NETCONTROL 0xe0 +#define IPTOS_PREC_INTERNETCONTROL 0xc0 +#define IPTOS_PREC_CRITIC_ECP 0xa0 +#define IPTOS_PREC_FLASHOVERRIDE 0x80 +#define IPTOS_PREC_FLASH 0x60 +#define IPTOS_PREC_IMMEDIATE 0x40 +#define IPTOS_PREC_PRIORITY 0x20 +#define IPTOS_PREC_ROUTINE 0x00 + +/* + * ECN (Explicit Congestion Notification) codepoints in RFC3168 mapped to the + * lower 2 bits of the TOS field. + */ +#define IPTOS_ECN_NOTECT 0x00 /* not-ECT */ +#define IPTOS_ECN_ECT1 0x01 /* ECN-capable transport (1) */ +#define IPTOS_ECN_ECT0 0x02 /* ECN-capable transport (0) */ +#define IPTOS_ECN_CE 0x03 /* congestion experienced */ +#define IPTOS_ECN_MASK 0x03 /* ECN field mask */ + +/* + * Definitions for options. + */ +#define IPOPT_COPIED(o) ((o)&0x80) +#define IPOPT_CLASS(o) ((o)&0x60) +#define IPOPT_NUMBER(o) ((o)&0x1f) + +#define IPOPT_CONTROL 0x00 +#define IPOPT_RESERVED1 0x20 +#define IPOPT_DEBMEAS 0x40 +#define IPOPT_RESERVED2 0x60 + +#define IPOPT_EOL 0 /* end of option list */ +#define IPOPT_NOP 1 /* no operation */ + +#define IPOPT_RR 7 /* record packet route */ +#define IPOPT_TS 68 /* timestamp */ +#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */ +#define IPOPT_LSRR 131 /* loose source route */ +#define IPOPT_ESO 133 /* extended security */ +#define IPOPT_CIPSO 134 /* commerical security */ +#define IPOPT_SATID 136 /* satnet id */ +#define IPOPT_SSRR 137 /* strict source route */ +#define IPOPT_RA 148 /* router alert */ + +/* + * Offsets to fields in options other than EOL and NOP. + */ +#define IPOPT_OPTVAL 0 /* option ID */ +#define IPOPT_OLEN 1 /* option length */ +#define IPOPT_OFFSET 2 /* offset within option */ +#define IPOPT_MINOFF 4 /* min value of above */ + +/* + * Time stamp option structure. + */ +struct ip_timestamp { + u_char ipt_code; /* IPOPT_TS */ + u_char ipt_len; /* size of structure (variable) */ + u_char ipt_ptr; /* index of current entry */ +#if BYTE_ORDER == LITTLE_ENDIAN + u_int ipt_flg:4, /* flags, see below */ + ipt_oflw:4; /* overflow counter */ +#endif +#if BYTE_ORDER == BIG_ENDIAN + u_int ipt_oflw:4, /* overflow counter */ + ipt_flg:4; /* flags, see below */ +#endif + union ipt_timestamp { + uint32_t ipt_time[1]; /* network format */ + struct ipt_ta { + struct in_addr ipt_addr; + uint32_t ipt_time; /* network format */ + } ipt_ta[1]; + } ipt_timestamp; +}; + +/* Flag bits for ipt_flg. */ +#define IPOPT_TS_TSONLY 0 /* timestamps only */ +#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ +#define IPOPT_TS_PRESPEC 3 /* specified modules only */ + +/* Bits for security (not byte swapped). */ +#define IPOPT_SECUR_UNCLASS 0x0000 +#define IPOPT_SECUR_CONFID 0xf135 +#define IPOPT_SECUR_EFTO 0x789a +#define IPOPT_SECUR_MMMM 0xbc4d +#define IPOPT_SECUR_RESTR 0xaf13 +#define IPOPT_SECUR_SECRET 0xd788 +#define IPOPT_SECUR_TOPSECRET 0x6bc5 + +/* + * Internet implementation parameters. + */ +#define MAXTTL 255 /* maximum time to live (seconds) */ +#define IPDEFTTL 64 /* default ttl, from RFC 1340 */ +#define IPFRAGTTL 60 /* time to live for frags, slowhz */ +#define IPTTLDEC 1 /* subtracted when forwarding */ +#define IP_MSS 576 /* default maximum segment size */ + +/* + * This is the real IPv4 pseudo header, used for computing the TCP and UDP + * checksums. For the Internet checksum, struct ipovly can be used instead. + * For stronger checksums, the real thing must be used. + */ +struct ippseudo { + struct in_addr ippseudo_src; /* source internet address */ + struct in_addr ippseudo_dst; /* destination internet address */ + u_char ippseudo_pad; /* pad, must be zero */ + u_char ippseudo_p; /* protocol */ + u_short ippseudo_len; /* protocol length */ +}; +#endif diff --git a/freebsd/sys/netinet/ip6.h b/freebsd/sys/netinet/ip6.h index f30da6d1..3fb08a78 100644 --- a/freebsd/sys/netinet/ip6.h +++ b/freebsd/sys/netinet/ip6.h @@ -1,2 +1,352 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/ip6.h> +/* $FreeBSD$ */ +/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */ + +/*- + * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ip.h 8.1 (Berkeley) 6/10/93 + */ + +#ifndef _NETINET_IP6_H_ +#define _NETINET_IP6_H_ + +/* + * Definition for internet protocol version 6. + * RFC 2460 + */ + +struct ip6_hdr { + union { + struct ip6_hdrctl { + u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */ + u_int16_t ip6_un1_plen; /* payload length */ + u_int8_t ip6_un1_nxt; /* next header */ + u_int8_t ip6_un1_hlim; /* hop limit */ + } ip6_un1; + u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */ + } ip6_ctlun; + struct in6_addr ip6_src; /* source address */ + struct in6_addr ip6_dst; /* destination address */ +} __packed; + +#define ip6_vfc ip6_ctlun.ip6_un2_vfc +#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow +#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen +#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt +#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim +#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim + +#define IPV6_VERSION 0x60 +#define IPV6_VERSION_MASK 0xf0 + +#if BYTE_ORDER == BIG_ENDIAN +#define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */ +#define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */ +#else +#if BYTE_ORDER == LITTLE_ENDIAN +#define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */ +#define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */ +#endif /* LITTLE_ENDIAN */ +#endif +#if 1 +/* ECN bits proposed by Sally Floyd */ +#define IP6TOS_CE 0x01 /* congestion experienced */ +#define IP6TOS_ECT 0x02 /* ECN-capable transport */ +#endif + +/* + * Extension Headers + */ + +struct ip6_ext { + u_int8_t ip6e_nxt; + u_int8_t ip6e_len; +} __packed; + +/* Hop-by-Hop options header */ +/* XXX should we pad it to force alignment on an 8-byte boundary? */ +struct ip6_hbh { + u_int8_t ip6h_nxt; /* next header */ + u_int8_t ip6h_len; /* length in units of 8 octets */ + /* followed by options */ +} __packed; + +/* Destination options header */ +/* XXX should we pad it to force alignment on an 8-byte boundary? */ +struct ip6_dest { + u_int8_t ip6d_nxt; /* next header */ + u_int8_t ip6d_len; /* length in units of 8 octets */ + /* followed by options */ +} __packed; + +/* Option types and related macros */ +#define IP6OPT_PAD1 0x00 /* 00 0 00000 */ +#define IP6OPT_PADN 0x01 /* 00 0 00001 */ +#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */ +#define IP6OPT_NSAP_ADDR 0xC3 /* 11 0 00011 */ +#define IP6OPT_TUNNEL_LIMIT 0x04 /* 00 0 00100 */ +#ifndef _KERNEL +#define IP6OPT_RTALERT 0x05 /* 00 0 00101 (KAME definition) */ +#endif +#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 (RFC3542, recommended) */ + +#define IP6OPT_RTALERT_LEN 4 +#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ +#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ +#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ +#define IP6OPT_MINLEN 2 + +#define IP6OPT_EID 0x8a /* 10 0 01010 */ + +#define IP6OPT_TYPE(o) ((o) & 0xC0) +#define IP6OPT_TYPE_SKIP 0x00 +#define IP6OPT_TYPE_DISCARD 0x40 +#define IP6OPT_TYPE_FORCEICMP 0x80 +#define IP6OPT_TYPE_ICMP 0xC0 + +#define IP6OPT_MUTABLE 0x20 + +/* IPv6 options: common part */ +struct ip6_opt { + u_int8_t ip6o_type; + u_int8_t ip6o_len; +} __packed; + +/* Jumbo Payload Option */ +struct ip6_opt_jumbo { + u_int8_t ip6oj_type; + u_int8_t ip6oj_len; + u_int8_t ip6oj_jumbo_len[4]; +} __packed; +#define IP6OPT_JUMBO_LEN 6 + +/* NSAP Address Option */ +struct ip6_opt_nsap { + u_int8_t ip6on_type; + u_int8_t ip6on_len; + u_int8_t ip6on_src_nsap_len; + u_int8_t ip6on_dst_nsap_len; + /* followed by source NSAP */ + /* followed by destination NSAP */ +} __packed; + +/* Tunnel Limit Option */ +struct ip6_opt_tunnel { + u_int8_t ip6ot_type; + u_int8_t ip6ot_len; + u_int8_t ip6ot_encap_limit; +} __packed; + +/* Router Alert Option */ +struct ip6_opt_router { + u_int8_t ip6or_type; + u_int8_t ip6or_len; + u_int8_t ip6or_value[2]; +} __packed; +/* Router alert values (in network byte order) */ +#if BYTE_ORDER == BIG_ENDIAN +#define IP6_ALERT_MLD 0x0000 +#define IP6_ALERT_RSVP 0x0001 +#define IP6_ALERT_AN 0x0002 +#else +#if BYTE_ORDER == LITTLE_ENDIAN +#define IP6_ALERT_MLD 0x0000 +#define IP6_ALERT_RSVP 0x0100 +#define IP6_ALERT_AN 0x0200 +#endif /* LITTLE_ENDIAN */ +#endif + +/* Routing header */ +struct ip6_rthdr { + u_int8_t ip6r_nxt; /* next header */ + u_int8_t ip6r_len; /* length in units of 8 octets */ + u_int8_t ip6r_type; /* routing type */ + u_int8_t ip6r_segleft; /* segments left */ + /* followed by routing type specific data */ +} __packed; + +/* Type 0 Routing header, deprecated by RFC 5095. */ +struct ip6_rthdr0 { + u_int8_t ip6r0_nxt; /* next header */ + u_int8_t ip6r0_len; /* length in units of 8 octets */ + u_int8_t ip6r0_type; /* always zero */ + u_int8_t ip6r0_segleft; /* segments left */ + u_int32_t ip6r0_reserved; /* reserved field */ + /* followed by up to 127 struct in6_addr */ +} __packed; + +/* Fragment header */ +struct ip6_frag { + u_int8_t ip6f_nxt; /* next header */ + u_int8_t ip6f_reserved; /* reserved field */ + u_int16_t ip6f_offlg; /* offset, reserved, and flag */ + u_int32_t ip6f_ident; /* identification */ +} __packed; + +#if BYTE_ORDER == BIG_ENDIAN +#define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ +#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ +#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ +#else /* BYTE_ORDER == LITTLE_ENDIAN */ +#define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ +#define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ +#define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ +#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + +/* + * Internet implementation parameters. + */ +#define IPV6_MAXHLIM 255 /* maximum hoplimit */ +#define IPV6_DEFHLIM 64 /* default hlim */ +#define IPV6_FRAGTTL 120 /* ttl for fragment packets, in slowtimo tick */ +#define IPV6_HLIMDEC 1 /* subtracted when forwarding */ + +#define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */ +#define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/ +#define IPV6_MAXOPTHDR 2048 /* max option header size, 256 64-bit words */ + +#ifdef _KERNEL +/* + * IP6_EXTHDR_CHECK ensures that region between the IP6 header and the + * target header (including IPv6 itself, extension headers and + * TCP/UDP/ICMP6 headers) are continuous. KAME requires drivers + * to store incoming data into one internal mbuf or one or more external + * mbufs(never into two or more internal mbufs). Thus, the third case is + * supposed to never be matched but is prepared just in case. + */ + +#define IP6_EXTHDR_CHECK(m, off, hlen, ret) \ +do { \ + if ((m)->m_next != NULL) { \ + if (((m)->m_flags & M_LOOP) && \ + ((m)->m_len < (off) + (hlen)) && \ + (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \ + V_ip6stat.ip6s_exthdrtoolong++; \ + return ret; \ + } else if ((m)->m_flags & M_EXT) { \ + if ((m)->m_len < (off) + (hlen)) { \ + V_ip6stat.ip6s_exthdrtoolong++; \ + m_freem(m); \ + return ret; \ + } \ + } else { \ + if ((m)->m_len < (off) + (hlen)) { \ + V_ip6stat.ip6s_exthdrtoolong++; \ + m_freem(m); \ + return ret; \ + } \ + } \ + } else { \ + if ((m)->m_len < (off) + (hlen)) { \ + V_ip6stat.ip6s_tooshort++; \ + in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \ + m_freem(m); \ + return ret; \ + } \ + } \ +} while (/*CONSTCOND*/ 0) + +/* + * IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to + * "len") is located in single mbuf, on contiguous memory region. + * The pointer to the region will be returned to pointer variable "val", + * with type "typ". + * IP6_EXTHDR_GET0 does the same, except that it aligns the structure at the + * very top of mbuf. GET0 is likely to make memory copy than GET. + * + * XXX we're now testing this, needs m_pulldown() + */ +#define IP6_EXTHDR_GET(val, typ, m, off, len) \ +do { \ + struct mbuf *t; \ + int tmp; \ + if ((m)->m_len >= (off) + (len)) \ + (val) = (typ)(mtod((m), caddr_t) + (off)); \ + else { \ + t = m_pulldown((m), (off), (len), &tmp); \ + if (t) { \ + if (t->m_len < tmp + (len)) \ + panic("m_pulldown malfunction"); \ + (val) = (typ)(mtod(t, caddr_t) + tmp); \ + } else { \ + (val) = (typ)NULL; \ + (m) = NULL; \ + } \ + } \ +} while (/*CONSTCOND*/ 0) + +#define IP6_EXTHDR_GET0(val, typ, m, off, len) \ +do { \ + struct mbuf *t; \ + if ((off) == 0) \ + (val) = (typ)mtod(m, caddr_t); \ + else { \ + t = m_pulldown((m), (off), (len), NULL); \ + if (t) { \ + if (t->m_len < (len)) \ + panic("m_pulldown malfunction"); \ + (val) = (typ)mtod(t, caddr_t); \ + } else { \ + (val) = (typ)NULL; \ + (m) = NULL; \ + } \ + } \ +} while (/*CONSTCOND*/ 0) + +#endif /*_KERNEL*/ + +#endif /* not _NETINET_IP6_H_ */ diff --git a/freebsd/sys/netinet/ip_carp.c b/freebsd/sys/netinet/ip_carp.c index 25b20895..7b2a7e18 100644 --- a/freebsd/sys/netinet/ip_carp.c +++ b/freebsd/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -26,71 +26,71 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_bpf.h> -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/types.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/conf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/limits.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/filio.h> -#include <freebsd/sys/sockio.h> - -#include <freebsd/sys/socket.h> +#include <rtems/bsd/local/opt_bpf.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/types.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/conf.h> +#include <sys/kernel.h> +#include <sys/limits.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <rtems/bsd/sys/time.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <sys/signalvar.h> +#include <sys/filio.h> +#include <sys/sockio.h> + +#include <sys/socket.h> #ifndef __rtems__ -#include <freebsd/sys/vnode.h> +#include <sys/vnode.h> #endif -#include <freebsd/machine/stdarg.h> +#include <machine/stdarg.h> -#include <freebsd/net/bpf.h> -#include <freebsd/net/ethernet.h> -#include <freebsd/net/fddi.h> -#include <freebsd/net/iso88025.h> -#include <freebsd/net/if.h> -#include <freebsd/net/if_clone.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> +#include <net/bpf.h> +#include <net/ethernet.h> +#include <net/fddi.h> +#include <net/iso88025.h> +#include <net/if.h> +#include <net/if_clone.h> +#include <net/if_dl.h> +#include <net/if_types.h> +#include <net/route.h> +#include <net/vnet.h> #ifdef INET -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/if_ether.h> -#include <freebsd/machine/in_cksum.h> +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/if_ether.h> +#include <machine/in_cksum.h> #endif #ifdef INET6 -#include <freebsd/netinet/icmp6.h> -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/ip6protosw.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/scope6_var.h> -#include <freebsd/netinet6/nd6.h> +#include <netinet/icmp6.h> +#include <netinet/ip6.h> +#include <netinet6/ip6protosw.h> +#include <netinet6/ip6_var.h> +#include <netinet6/scope6_var.h> +#include <netinet6/nd6.h> #endif -#include <freebsd/crypto/sha1.h> -#include <freebsd/netinet/ip_carp.h> +#include <crypto/sha1.h> +#include <netinet/ip_carp.h> #define CARP_IFNAME "carp" static MALLOC_DEFINE(M_CARP, "CARP", "CARP interfaces"); diff --git a/freebsd/sys/netinet/ip_divert.c b/freebsd/sys/netinet/ip_divert.c index 13999825..857df606 100644 --- a/freebsd/sys/netinet/ip_divert.c +++ b/freebsd/sys/netinet/ip_divert.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -29,53 +29,53 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #if !defined(KLD_MODULE) -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_sctp.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_sctp.h> #ifndef INET #error "IPDIVERT requires INET." #endif #endif -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sx.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <sys/kernel.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/rwlock.h> +#include <sys/signalvar.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sx.h> +#include <sys/sysctl.h> +#include <sys/systm.h> + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/netisr.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> #ifdef SCTP -#include <freebsd/netinet/sctp_crc32.h> +#include <netinet/sctp_crc32.h> #endif -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> /* * Divert sockets diff --git a/freebsd/sys/netinet/ip_divert.h b/freebsd/sys/netinet/ip_divert.h index eb9b33d4..b8bcf4fb 100644 --- a/freebsd/sys/netinet/ip_divert.h +++ b/freebsd/sys/netinet/ip_divert.h @@ -32,8 +32,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_IP_DIVERT_HH_ -#define _NETINET_IP_DIVERT_HH_ +#ifndef _NETINET_IP_DIVERT_H_ +#define _NETINET_IP_DIVERT_H_ /* * divert has no custom kernel-userland API. @@ -52,4 +52,4 @@ * sin_addr = IN: address of the incoming interface; * OUT: INADDR_ANY */ -#endif /* _NETINET_IP_DIVERT_HH_ */ +#endif /* _NETINET_IP_DIVERT_H_ */ diff --git a/freebsd/sys/netinet/ip_ecn.c b/freebsd/sys/netinet/ip_ecn.c index 97b32b2c..33f07b8a 100644 --- a/freebsd/sys/netinet/ip_ecn.c +++ b/freebsd/sys/netinet/ip_ecn.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* $KAME: ip_ecn.c,v 1.12 2002/01/07 11:34:47 kjc Exp $ */ @@ -36,27 +36,27 @@ * http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/errno.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <rtems/bsd/sys/errno.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif -#include <freebsd/netinet/ip_ecn.h> +#include <netinet/ip_ecn.h> #ifdef INET6 -#include <freebsd/netinet6/ip6_ecn.h> +#include <netinet6/ip6_ecn.h> #endif /* diff --git a/freebsd/sys/netinet/ip_ecn.h b/freebsd/sys/netinet/ip_ecn.h index 271c8a47..6a814160 100644 --- a/freebsd/sys/netinet/ip_ecn.h +++ b/freebsd/sys/netinet/ip_ecn.h @@ -35,11 +35,11 @@ * http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt */ -#ifndef _NETINET_IP_ECN_HH_ -#define _NETINET_IP_ECN_HH_ +#ifndef _NETINET_IP_ECN_H_ +#define _NETINET_IP_ECN_H_ #if defined(_KERNEL) && !defined(_LKM) -#include <freebsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet.h> #endif #define ECN_ALLOWED 1 /* ECN allowed */ diff --git a/freebsd/sys/netinet/ip_encap.c b/freebsd/sys/netinet/ip_encap.c index 45b0593c..9c7b904d 100644 --- a/freebsd/sys/netinet/ip_encap.c +++ b/freebsd/sys/netinet/ip_encap.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* $KAME: ip_encap.c,v 1.41 2001/03/15 08:35:08 itojun Exp $ */ @@ -58,41 +58,41 @@ */ /* XXX is M_NETADDR correct? */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_mrouting.h> -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_mrouting.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/sockio.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/errno.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/queue.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/socket.h> +#include <sys/sockio.h> +#include <sys/mbuf.h> +#include <rtems/bsd/sys/errno.h> +#include <sys/protosw.h> +#include <sys/queue.h> -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> +#include <net/if.h> +#include <net/route.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_encap.h> +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_encap.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/ip6protosw.h> +#include <netinet/ip6.h> +#include <netinet6/ip6_var.h> +#include <netinet6/ip6protosw.h> #endif -#include <freebsd/machine/stdarg.h> +#include <machine/stdarg.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> +#include <sys/kernel.h> +#include <sys/malloc.h> static MALLOC_DEFINE(M_NETADDR, "encap_export_host", "Export host address structure"); static void encap_add(struct encaptab *); diff --git a/freebsd/sys/netinet/ip_encap.h b/freebsd/sys/netinet/ip_encap.h index 44dd1a0d..3b1a5aee 100644 --- a/freebsd/sys/netinet/ip_encap.h +++ b/freebsd/sys/netinet/ip_encap.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef _NETINET_IP_ENCAP_HH_ -#define _NETINET_IP_ENCAP_HH_ +#ifndef _NETINET_IP_ENCAP_H_ +#define _NETINET_IP_ENCAP_H_ #ifdef _KERNEL @@ -61,4 +61,4 @@ int encap_detach(const struct encaptab *); void *encap_getarg(struct mbuf *); #endif -#endif /*_NETINET_IP_ENCAP_HH_*/ +#endif /*_NETINET_IP_ENCAP_H_*/ diff --git a/freebsd/sys/netinet/ip_fastfwd.c b/freebsd/sys/netinet/ip_fastfwd.c index 6d406b2b..f27a4f7d 100644 --- a/freebsd/sys/netinet/ip_fastfwd.c +++ b/freebsd/sys/netinet/ip_fastfwd.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2003 Andre Oppermann, Internet Business Solutions AG @@ -75,38 +75,38 @@ * is being followed here. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipstealth.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/sysctl.h> - -#include <freebsd/net/pfil.h> -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/if_var.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/ip_options.h> - -#include <freebsd/machine/in_cksum.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipstealth.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/sysctl.h> + +#include <net/pfil.h> +#include <net/if.h> +#include <net/if_types.h> +#include <net/if_var.h> +#include <net/if_dl.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_icmp.h> +#include <netinet/ip_options.h> + +#include <machine/in_cksum.h> static VNET_DEFINE(int, ipfastforward_active); #define V_ipfastforward_active VNET(ipfastforward_active) diff --git a/freebsd/sys/netinet/ip_gre.c b/freebsd/sys/netinet/ip_gre.c index 253376de..cd118a53 100644 --- a/freebsd/sys/netinet/ip_gre.c +++ b/freebsd/sys/netinet/ip_gre.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* $NetBSD: ip_gre.c,v 1.29 2003/09/05 23:02:43 itojun Exp $ */ @@ -46,52 +46,52 @@ * This currently handles IPPROTO_GRE, IPPROTO_MOBILE */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_atalk.h> -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/errno.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/net/bpf.h> -#include <freebsd/net/ethernet.h> -#include <freebsd/net/if.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/route.h> -#include <freebsd/net/raw_cb.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_atalk.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/protosw.h> +#include <rtems/bsd/sys/errno.h> +#include <rtems/bsd/sys/time.h> +#include <sys/kernel.h> +#include <sys/syslog.h> +#include <net/bpf.h> +#include <net/ethernet.h> +#include <net/if.h> +#include <net/netisr.h> +#include <net/route.h> +#include <net/raw_cb.h> #ifdef INET -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_gre.h> -#include <freebsd/machine/in_cksum.h> +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_gre.h> +#include <machine/in_cksum.h> #else #error ip_gre input without IP? #endif #ifdef NETATALK -#include <freebsd/netatalk/at.h> -#include <freebsd/netatalk/at_var.h> -#include <freebsd/netatalk/at_extern.h> +#include <netatalk/at.h> +#include <netatalk/at_var.h> +#include <netatalk/at_extern.h> #endif /* Needs IP headers. */ -#include <freebsd/net/if_gre.h> +#include <net/if_gre.h> -#include <freebsd/machine/stdarg.h> +#include <machine/stdarg.h> #if 1 void gre_inet_ntoa(struct in_addr in); /* XXX */ diff --git a/freebsd/sys/netinet/ip_icmp.c b/freebsd/sys/netinet/ip_icmp.c index b7a83128..d8d34aa4 100644 --- a/freebsd/sys/netinet/ip_icmp.c +++ b/freebsd/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -31,47 +31,47 @@ * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcpip.h> -#include <freebsd/netinet/icmp_var.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <rtems/bsd/sys/time.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> + +#include <net/if.h> +#include <net/if_types.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_icmp.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/tcp.h> +#include <netinet/tcp_var.h> +#include <netinet/tcpip.h> +#include <netinet/icmp_var.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/key.h> +#include <netipsec/ipsec.h> +#include <netipsec/key.h> #endif -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> /* * ICMP routines: error generation, receive packet processing, and diff --git a/freebsd/sys/netinet/ip_icmp.h b/freebsd/sys/netinet/ip_icmp.h index 903f033d..9cabdb58 100644 --- a/freebsd/sys/netinet/ip_icmp.h +++ b/freebsd/sys/netinet/ip_icmp.h @@ -1,2 +1,214 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/ip_icmp.h> +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 + * $FreeBSD$ + */ + +#ifndef _NETINET_IP_ICMP_H_ +#define _NETINET_IP_ICMP_H_ + +/* + * Interface Control Message Protocol Definitions. + * Per RFC 792, September 1981. + */ + +/* + * Internal of an ICMP Router Advertisement + */ +struct icmp_ra_addr { + u_int32_t ira_addr; + u_int32_t ira_preference; +}; + +/* + * Structure of an icmp header. + */ +struct icmphdr { + u_char icmp_type; /* type of message, see below */ + u_char icmp_code; /* type sub code */ + u_short icmp_cksum; /* ones complement cksum of struct */ +}; + +/* + * Structure of an icmp packet. + * + * XXX: should start with a struct icmphdr. + */ +struct icmp { + u_char icmp_type; /* type of message, see below */ + u_char icmp_code; /* type sub code */ + u_short icmp_cksum; /* ones complement cksum of struct */ + union { + u_char ih_pptr; /* ICMP_PARAMPROB */ + struct in_addr ih_gwaddr; /* ICMP_REDIRECT */ + struct ih_idseq { + uint16_t icd_id; /* network format */ + uint16_t icd_seq; /* network format */ + } ih_idseq; + int ih_void; + + /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ + struct ih_pmtu { + uint16_t ipm_void; /* network format */ + uint16_t ipm_nextmtu; /* network format */ + } ih_pmtu; + + struct ih_rtradv { + u_char irt_num_addrs; + u_char irt_wpa; + u_int16_t irt_lifetime; + } ih_rtradv; + } icmp_hun; +#define icmp_pptr icmp_hun.ih_pptr +#define icmp_gwaddr icmp_hun.ih_gwaddr +#define icmp_id icmp_hun.ih_idseq.icd_id +#define icmp_seq icmp_hun.ih_idseq.icd_seq +#define icmp_void icmp_hun.ih_void +#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void +#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu +#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs +#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa +#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime + union { + struct id_ts { /* ICMP Timestamp */ + /* + * The next 3 fields are in network format, + * milliseconds since 00:00 GMT + */ + uint32_t its_otime; /* Originate */ + uint32_t its_rtime; /* Receive */ + uint32_t its_ttime; /* Transmit */ + } id_ts; + struct id_ip { + struct ip idi_ip; + /* options and then 64 bits of data */ + } id_ip; + struct icmp_ra_addr id_radv; + u_int32_t id_mask; + char id_data[1]; + } icmp_dun; +#define icmp_otime icmp_dun.id_ts.its_otime +#define icmp_rtime icmp_dun.id_ts.its_rtime +#define icmp_ttime icmp_dun.id_ts.its_ttime +#define icmp_ip icmp_dun.id_ip.idi_ip +#define icmp_radv icmp_dun.id_radv +#define icmp_mask icmp_dun.id_mask +#define icmp_data icmp_dun.id_data +}; + +/* + * Lower bounds on packet lengths for various types. + * For the error advice packets must first insure that the + * packet is large enough to contain the returned ip header. + * Only then can we do the check to see if 64 bits of packet + * data have been returned, since we need to check the returned + * ip header length. + */ +#define ICMP_MINLEN 8 /* abs minimum */ +#define ICMP_TSLEN (8 + 3 * sizeof (uint32_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) + /* N.B.: must separately check that ip_hl >= 5 */ + +/* + * Definition of type and code field values. + */ +#define ICMP_ECHOREPLY 0 /* echo reply */ +#define ICMP_UNREACH 3 /* dest unreachable, codes: */ +#define ICMP_UNREACH_NET 0 /* bad net */ +#define ICMP_UNREACH_HOST 1 /* bad host */ +#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */ +#define ICMP_UNREACH_PORT 3 /* bad port */ +#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ +#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ +#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ +#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ +#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */ +#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */ +#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */ +#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ +#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ +#define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */ +#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */ +#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */ +#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ +#define ICMP_REDIRECT 5 /* shorter route, codes: */ +#define ICMP_REDIRECT_NET 0 /* for network */ +#define ICMP_REDIRECT_HOST 1 /* for host */ +#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */ +#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ +#define ICMP_ALTHOSTADDR 6 /* alternate host address */ +#define ICMP_ECHO 8 /* echo service */ +#define ICMP_ROUTERADVERT 9 /* router advertisement */ +#define ICMP_ROUTERADVERT_NORMAL 0 /* normal advertisement */ +#define ICMP_ROUTERADVERT_NOROUTE_COMMON 16 /* selective routing */ +#define ICMP_ROUTERSOLICIT 10 /* router solicitation */ +#define ICMP_TIMXCEED 11 /* time exceeded, code: */ +#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */ +#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ +#define ICMP_PARAMPROB 12 /* ip header bad */ +#define ICMP_PARAMPROB_ERRATPTR 0 /* error at param ptr */ +#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ +#define ICMP_PARAMPROB_LENGTH 2 /* bad length */ +#define ICMP_TSTAMP 13 /* timestamp request */ +#define ICMP_TSTAMPREPLY 14 /* timestamp reply */ +#define ICMP_IREQ 15 /* information request */ +#define ICMP_IREQREPLY 16 /* information reply */ +#define ICMP_MASKREQ 17 /* address mask request */ +#define ICMP_MASKREPLY 18 /* address mask reply */ +#define ICMP_TRACEROUTE 30 /* traceroute */ +#define ICMP_DATACONVERR 31 /* data conversion error */ +#define ICMP_MOBILE_REDIRECT 32 /* mobile host redirect */ +#define ICMP_IPV6_WHEREAREYOU 33 /* IPv6 where-are-you */ +#define ICMP_IPV6_IAMHERE 34 /* IPv6 i-am-here */ +#define ICMP_MOBILE_REGREQUEST 35 /* mobile registration req */ +#define ICMP_MOBILE_REGREPLY 36 /* mobile registration reply */ +#define ICMP_SKIP 39 /* SKIP */ +#define ICMP_PHOTURIS 40 /* Photuris */ +#define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* unknown sec index */ +#define ICMP_PHOTURIS_AUTH_FAILED 2 /* auth failed */ +#define ICMP_PHOTURIS_DECRYPT_FAILED 3 /* decrypt failed */ + +#define ICMP_MAXTYPE 40 + +#define ICMP_INFOTYPE(type) \ + ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ + (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ + (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ + (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ + (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) + +#ifdef _KERNEL +void icmp_error(struct mbuf *, int, int, uint32_t, int); +void icmp_input(struct mbuf *, int); +int ip_next_mtu(int, int); +#endif + +#endif diff --git a/freebsd/sys/netinet/ip_id.c b/freebsd/sys/netinet/ip_id.c index ba99cdbb..21bb84cc 100644 --- a/freebsd/sys/netinet/ip_id.c +++ b/freebsd/sys/netinet/ip_id.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -76,20 +76,20 @@ __FBSDID("$FreeBSD$"); * enabled. */ -#include <freebsd/sys/types.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/libkern.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/random.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/sys/bitstring.h> +#include <rtems/bsd/sys/types.h> +#include <sys/malloc.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/time.h> +#include <sys/kernel.h> +#include <sys/libkern.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/random.h> +#include <sys/systm.h> +#include <sys/sysctl.h> +#include <netinet/in.h> +#include <netinet/ip_var.h> +#include <sys/bitstring.h> static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); diff --git a/freebsd/sys/netinet/ip_input.c b/freebsd/sys/netinet/ip_input.c index 3964e886..1b7f4319 100644 --- a/freebsd/sys/netinet/ip_input.c +++ b/freebsd/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -31,58 +31,58 @@ * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_bootp.h> -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipstealth.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_route.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/callout.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/sysctl.h> - -#include <freebsd/net/pfil.h> -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/if_var.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/route.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/vnet.h> -#include <freebsd/net/flowtable.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/machine/in_cksum.h> -#include <freebsd/netinet/ip_carp.h> +#include <rtems/bsd/local/opt_bootp.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipstealth.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_route.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/callout.h> +#include <sys/mbuf.h> +#include <sys/malloc.h> +#include <sys/domain.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <rtems/bsd/sys/time.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/rwlock.h> +#include <sys/syslog.h> +#include <sys/sysctl.h> + +#include <net/pfil.h> +#include <net/if.h> +#include <net/if_types.h> +#include <net/if_var.h> +#include <net/if_dl.h> +#include <net/route.h> +#include <net/netisr.h> +#include <net/vnet.h> +#include <net/flowtable.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/ip_fw.h> +#include <netinet/ip_icmp.h> +#include <netinet/ip_options.h> +#include <machine/in_cksum.h> +#include <netinet/ip_carp.h> #ifdef IPSEC -#include <freebsd/netinet/ip_ipsec.h> +#include <netinet/ip_ipsec.h> #endif /* IPSEC */ -#include <freebsd/sys/socketvar.h> +#include <sys/socketvar.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #ifdef CTASSERT CTASSERT(sizeof(struct ip) == 20); diff --git a/freebsd/sys/netinet/ip_ipsec.c b/freebsd/sys/netinet/ip_ipsec.c index f19d5e0e..f83b2d93 100644 --- a/freebsd/sys/netinet/ip_ipsec.c +++ b/freebsd/sys/netinet/ip_ipsec.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -29,45 +29,45 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_sctp.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_sctp.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/errno.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/errno.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/ip_ipsec.h> +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/ip_ipsec.h> #ifdef SCTP -#include <freebsd/netinet/sctp_crc32.h> +#include <netinet/sctp_crc32.h> #endif -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/xform.h> -#include <freebsd/netipsec/key.h> +#include <netipsec/ipsec.h> +#include <netipsec/xform.h> +#include <netipsec/key.h> #endif /*IPSEC*/ extern struct protosw inetsw[]; diff --git a/freebsd/sys/netinet/ip_ipsec.h b/freebsd/sys/netinet/ip_ipsec.h index c4de1652..31bc86a1 100644 --- a/freebsd/sys/netinet/ip_ipsec.h +++ b/freebsd/sys/netinet/ip_ipsec.h @@ -29,8 +29,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_IP_IPSEC_HH_ -#define _NETINET_IP_IPSEC_HH_ +#ifndef _NETINET_IP_IPSEC_H_ +#define _NETINET_IP_IPSEC_H_ int ip_ipsec_filtertunnel(struct mbuf *); int ip_ipsec_fwd(struct mbuf *); diff --git a/freebsd/sys/netinet/ip_mroute.c b/freebsd/sys/netinet/ip_mroute.c index 2f7676ad..022f2451 100644 --- a/freebsd/sys/netinet/ip_mroute.c +++ b/freebsd/sys/netinet/ip_mroute.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1989 Stephen Deering @@ -68,55 +68,55 @@ * TODO: Sync ip6_mroute.c with this file. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_mrouting.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_mrouting.h> #define _PIM_VT 1 -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/stddef.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/ktr.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sockio.h> -#include <freebsd/sys/sx.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/time.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/igmp.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_encap.h> -#include <freebsd/netinet/ip_mroute.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/pim.h> -#include <freebsd/netinet/pim_var.h> -#include <freebsd/netinet/udp.h> - -#include <freebsd/machine/in_cksum.h> - -#include <freebsd/security/mac/mac_framework.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/stddef.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/ktr.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <sys/priv.h> +#include <sys/protosw.h> +#include <sys/signalvar.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sockio.h> +#include <sys/sx.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/time.h> + +#include <net/if.h> +#include <net/netisr.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/igmp.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_encap.h> +#include <netinet/ip_mroute.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/pim.h> +#include <netinet/pim_var.h> +#include <netinet/udp.h> + +#include <machine/in_cksum.h> + +#include <security/mac/mac_framework.h> #ifndef KTR_IPMF #define KTR_IPMF KTR_INET diff --git a/freebsd/sys/netinet/ip_mroute.h b/freebsd/sys/netinet/ip_mroute.h index 3bc7f52f..c54c75aa 100644 --- a/freebsd/sys/netinet/ip_mroute.h +++ b/freebsd/sys/netinet/ip_mroute.h @@ -34,8 +34,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_IP_MROUTE_HH_ -#define _NETINET_IP_MROUTE_HH_ +#ifndef _NETINET_IP_MROUTE_H_ +#define _NETINET_IP_MROUTE_H_ /* * Definitions for IP multicast forwarding. @@ -356,4 +356,4 @@ extern int (*mrt_ioctl)(u_long, caddr_t, int); #endif /* _KERNEL */ -#endif /* _NETINET_IP_MROUTE_HH_ */ +#endif /* _NETINET_IP_MROUTE_H_ */ diff --git a/freebsd/sys/netinet/ip_options.c b/freebsd/sys/netinet/ip_options.c index f8b31607..8012fd3f 100644 --- a/freebsd/sys/netinet/ip_options.c +++ b/freebsd/sys/netinet/ip_options.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 1982, 1986, 1988, 1993 @@ -31,43 +31,43 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipstealth.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/sysctl.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/if_var.h> -#include <freebsd/net/if_dl.h> -#include <freebsd/net/route.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/machine/in_cksum.h> - -#include <freebsd/sys/socketvar.h> - -#include <freebsd/security/mac/mac_framework.h> +#include <rtems/bsd/local/opt_ipstealth.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <sys/domain.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <rtems/bsd/sys/time.h> +#include <sys/kernel.h> +#include <sys/syslog.h> +#include <sys/sysctl.h> + +#include <net/if.h> +#include <net/if_types.h> +#include <net/if_var.h> +#include <net/if_dl.h> +#include <net/route.h> +#include <net/netisr.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/ip_icmp.h> +#include <machine/in_cksum.h> + +#include <sys/socketvar.h> + +#include <security/mac/mac_framework.h> static int ip_dosourceroute = 0; SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, diff --git a/freebsd/sys/netinet/ip_options.h b/freebsd/sys/netinet/ip_options.h index 9c08004d..7ba5ae64 100644 --- a/freebsd/sys/netinet/ip_options.h +++ b/freebsd/sys/netinet/ip_options.h @@ -31,8 +31,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_IP_OPTIONS_HH_ -#define _NETINET_IP_OPTIONS_HH_ +#ifndef _NETINET_IP_OPTIONS_H_ +#define _NETINET_IP_OPTIONS_H_ struct ipoptrt { struct in_addr dst; /* final destination */ @@ -57,4 +57,4 @@ int ip_pcbopts(struct inpcb *, int, struct mbuf *); void ip_stripoptions(struct mbuf *, struct mbuf *); struct mbuf *ip_srcroute(struct mbuf *); -#endif /* !_NETINET_IP_OPTIONS_HH_ */ +#endif /* !_NETINET_IP_OPTIONS_H_ */ diff --git a/freebsd/sys/netinet/ip_output.c b/freebsd/sys/netinet/ip_output.c index 51132333..c01e0d32 100644 --- a/freebsd/sys/netinet/ip_output.c +++ b/freebsd/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993 @@ -31,60 +31,60 @@ * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_route.h> -#include <freebsd/local/opt_mbuf_stress_test.h> -#include <freebsd/local/opt_mpath.h> -#include <freebsd/local/opt_sctp.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/ucred.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_llatbl.h> -#include <freebsd/net/netisr.h> -#include <freebsd/net/pfil.h> -#include <freebsd/net/route.h> -#include <freebsd/net/flowtable.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_route.h> +#include <rtems/bsd/local/opt_mbuf_stress_test.h> +#include <rtems/bsd/local/opt_mpath.h> +#include <rtems/bsd/local/opt_sctp.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> +#include <sys/ucred.h> + +#include <net/if.h> +#include <net/if_llatbl.h> +#include <net/netisr.h> +#include <net/pfil.h> +#include <net/route.h> +#include <net/flowtable.h> #ifdef RADIX_MPATH -#include <freebsd/net/radix_mpath.h> +#include <net/radix_mpath.h> #endif -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> #ifdef SCTP -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_crc32.h> +#include <netinet/sctp.h> +#include <netinet/sctp_crc32.h> #endif #ifdef IPSEC -#include <freebsd/netinet/ip_ipsec.h> -#include <freebsd/netipsec/ipsec.h> +#include <netinet/ip_ipsec.h> +#include <netipsec/ipsec.h> #endif /* IPSEC*/ -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #define print_ip(x, a, y) printf("%s %d.%d.%d.%d%s",\ x, (ntohl(a.s_addr)>>24)&0xFF,\ diff --git a/freebsd/sys/netinet/ip_var.h b/freebsd/sys/netinet/ip_var.h index 2902174d..222b7efe 100644 --- a/freebsd/sys/netinet/ip_var.h +++ b/freebsd/sys/netinet/ip_var.h @@ -30,10 +30,10 @@ * $FreeBSD$ */ -#ifndef _NETINET_IP_VAR_HH_ -#define _NETINET_IP_VAR_HH_ +#ifndef _NETINET_IP_VAR_H_ +#define _NETINET_IP_VAR_H_ -#include <freebsd/sys/queue.h> +#include <sys/queue.h> /* * Overlay for ip header used by other protocols (tcp, udp). @@ -129,7 +129,7 @@ struct ipstat { #ifdef _KERNEL -#include <freebsd/net/vnet.h> +#include <net/vnet.h> /* * In-kernel consumers can use these accessor macros directly to update @@ -312,4 +312,4 @@ VNET_DECLARE(int, ip_do_randomid); #endif /* _KERNEL */ -#endif /* !_NETINET_IP_VAR_HH_ */ +#endif /* !_NETINET_IP_VAR_H_ */ diff --git a/freebsd/sys/netinet/ipfw/dn_heap.c b/freebsd/sys/netinet/ipfw/dn_heap.c index 1e6133bc..3af37a86 100644 --- a/freebsd/sys/netinet/ipfw/dn_heap.c +++ b/freebsd/sys/netinet/ipfw/dn_heap.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1998-2002,2010 Luigi Rizzo, Universita` di Pisa @@ -32,24 +32,24 @@ * $FreeBSD$ */ -#include <freebsd/sys/cdefs.h> -#include <freebsd/sys/param.h> +#include <sys/cdefs.h> +#include <rtems/bsd/sys/param.h> #ifdef _KERNEL __FBSDID("$FreeBSD$"); -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/netinet/ipfw/dn_heap.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <netinet/ipfw/dn_heap.h> #ifndef log #define log(x, arg...) #endif #else /* !_KERNEL */ -#include <freebsd/stdio.h> -#include <freebsd/dn_test.h> -#include <freebsd/strings.h> -#include <freebsd/stdlib.h> +#include <stdio.h> +#include <dn_test.h> +#include <strings.h> +#include <stdlib.h> #include "dn_heap.h" #define log(x, arg...) fprintf(stderr, ## arg) diff --git a/freebsd/sys/netinet/ipfw/dn_sched_fifo.c b/freebsd/sys/netinet/ipfw/dn_sched_fifo.c index 6d5a4a12..3bd5e127 100644 --- a/freebsd/sys/netinet/ipfw/dn_sched_fifo.c +++ b/freebsd/sys/netinet/ipfw/dn_sched_fifo.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa @@ -31,22 +31,22 @@ */ #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/net/if.h> /* IFNAMSIZ */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ipfw_rule_ref */ -#include <freebsd/netinet/ip_fw.h> /* flow_id */ -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <sys/malloc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <net/if.h> /* IFNAMSIZ */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ipfw_rule_ref */ +#include <netinet/ip_fw.h> /* flow_id */ +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> #else -#include <freebsd/dn_test.h> +#include <dn_test.h> #endif /* diff --git a/freebsd/sys/netinet/ipfw/dn_sched_prio.c b/freebsd/sys/netinet/ipfw/dn_sched_prio.c index c6b6027c..b3cb689c 100644 --- a/freebsd/sys/netinet/ipfw/dn_sched_prio.c +++ b/freebsd/sys/netinet/ipfw/dn_sched_prio.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa @@ -30,22 +30,22 @@ * $FreeBSD$ */ #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/net/if.h> /* IFNAMSIZ */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ipfw_rule_ref */ -#include <freebsd/netinet/ip_fw.h> /* flow_id */ -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <sys/malloc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <net/if.h> /* IFNAMSIZ */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ipfw_rule_ref */ +#include <netinet/ip_fw.h> /* flow_id */ +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> #else -#include <freebsd/dn_test.h> +#include <dn_test.h> #endif #define DN_SCHED_PRIO 5 //XXX diff --git a/freebsd/sys/netinet/ipfw/dn_sched_qfq.c b/freebsd/sys/netinet/ipfw/dn_sched_qfq.c index 23890199..c8fc4886 100644 --- a/freebsd/sys/netinet/ipfw/dn_sched_qfq.c +++ b/freebsd/sys/netinet/ipfw/dn_sched_qfq.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 2010 Fabio Checconi, Luigi Rizzo, Paolo Valente @@ -31,22 +31,22 @@ */ #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/net/if.h> /* IFNAMSIZ */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ipfw_rule_ref */ -#include <freebsd/netinet/ip_fw.h> /* flow_id */ -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <sys/malloc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <net/if.h> /* IFNAMSIZ */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ipfw_rule_ref */ +#include <netinet/ip_fw.h> /* flow_id */ +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> #else -#include <freebsd/dn_test.h> +#include <dn_test.h> #endif #ifdef QFQ_DEBUG diff --git a/freebsd/sys/netinet/ipfw/dn_sched_rr.c b/freebsd/sys/netinet/ipfw/dn_sched_rr.c index 4aa833f6..ccfd855c 100644 --- a/freebsd/sys/netinet/ipfw/dn_sched_rr.c +++ b/freebsd/sys/netinet/ipfw/dn_sched_rr.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa @@ -31,22 +31,22 @@ */ #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/net/if.h> /* IFNAMSIZ */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ipfw_rule_ref */ -#include <freebsd/netinet/ip_fw.h> /* flow_id */ -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <sys/malloc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <net/if.h> /* IFNAMSIZ */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ipfw_rule_ref */ +#include <netinet/ip_fw.h> /* flow_id */ +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> #else -#include <freebsd/dn_test.h> +#include <dn_test.h> #endif #define DN_SCHED_RR 3 // XXX Where? diff --git a/freebsd/sys/netinet/ipfw/dn_sched_wf2q.c b/freebsd/sys/netinet/ipfw/dn_sched_wf2q.c index c1e4c21d..330f78e2 100644 --- a/freebsd/sys/netinet/ipfw/dn_sched_wf2q.c +++ b/freebsd/sys/netinet/ipfw/dn_sched_wf2q.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa @@ -32,22 +32,22 @@ */ #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/net/if.h> /* IFNAMSIZ */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ipfw_rule_ref */ -#include <freebsd/netinet/ip_fw.h> /* flow_id */ -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <sys/malloc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/kernel.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <net/if.h> /* IFNAMSIZ */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ipfw_rule_ref */ +#include <netinet/ip_fw.h> /* flow_id */ +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> #else -#include <freebsd/dn_test.h> +#include <dn_test.h> #endif #ifndef MAX64 diff --git a/freebsd/sys/netinet/ipfw/ip_dn_glue.c b/freebsd/sys/netinet/ipfw/ip_dn_glue.c index 302c4d29..8c8c3ef8 100644 --- a/freebsd/sys/netinet/ipfw/ip_dn_glue.c +++ b/freebsd/sys/netinet/ipfw/ip_dn_glue.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa @@ -32,31 +32,31 @@ * Binary compatibility support for /sbin/ipfw RELENG_7 and RELENG_8 */ -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/taskqueue.h> -#include <freebsd/net/if.h> /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ip_output(), IP_FORWARDING */ -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/module.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <rtems/bsd/sys/time.h> +#include <sys/taskqueue.h> +#include <net/if.h> /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */ +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> /* FREEBSD7.2 ip_dummynet.h r191715*/ diff --git a/freebsd/sys/netinet/ipfw/ip_dn_io.c b/freebsd/sys/netinet/ipfw/ip_dn_io.c index 7a2c46d4..72f0c354 100644 --- a/freebsd/sys/netinet/ipfw/ip_dn_io.c +++ b/freebsd/sys/netinet/ipfw/ip_dn_io.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2010 Luigi Rizzo, Riccardo Panicucci, Universita` di Pisa @@ -29,40 +29,40 @@ /* * Dummynet portions related to packet handling. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/net/if.h> /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ -#include <freebsd/net/netisr.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> /* ip_len, ip_off */ -#include <freebsd/netinet/ip_var.h> /* ip_output(), IP_FORWARDING */ -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> - -#include <freebsd/netinet/if_ether.h> /* various ether_* routines */ - -#include <freebsd/netinet/ip6.h> /* for ip6_input, ip6_output prototypes */ -#include <freebsd/netinet6/ip6_var.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/module.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <rtems/bsd/sys/time.h> +#include <sys/sysctl.h> +#include <net/if.h> /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ +#include <net/netisr.h> +#include <netinet/in.h> +#include <netinet/ip.h> /* ip_len, ip_off */ +#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */ +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> + +#include <netinet/if_ether.h> /* various ether_* routines */ + +#include <netinet/ip6.h> /* for ip6_input, ip6_output prototypes */ +#include <netinet6/ip6_var.h> /* * We keep a private variable for the simulation time, but we could diff --git a/freebsd/sys/netinet/ipfw/ip_dummynet.c b/freebsd/sys/netinet/ipfw/ip_dummynet.c index dca39d06..5d51c30b 100644 --- a/freebsd/sys/netinet/ipfw/ip_dummynet.c +++ b/freebsd/sys/netinet/ipfw/ip_dummynet.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1998-2002,2010 Luigi Rizzo, Universita` di Pisa @@ -27,38 +27,38 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* * Configuration and internal object management for dummynet. */ -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/time.h> -#include <freebsd/sys/taskqueue.h> -#include <freebsd/net/if.h> /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* ip_output(), IP_FORWARDING */ -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netinet/ipfw/dn_heap.h> -#include <freebsd/netinet/ip_dummynet.h> -#include <freebsd/netinet/ipfw/ip_dn_private.h> -#include <freebsd/netinet/ipfw/dn_sched.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/module.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <rtems/bsd/sys/time.h> +#include <sys/taskqueue.h> +#include <net/if.h> /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ +#include <netinet/in.h> +#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */ +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netinet/ipfw/dn_heap.h> +#include <netinet/ip_dummynet.h> +#include <netinet/ipfw/ip_dn_private.h> +#include <netinet/ipfw/dn_sched.h> /* which objects to copy */ #define DN_C_LINK 0x01 diff --git a/freebsd/sys/netinet/ipfw/ip_fw2.c b/freebsd/sys/netinet/ipfw/ip_fw2.c index 682cced1..dd0c2fea 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw2.c +++ b/freebsd/sys/netinet/ipfw/ip_fw2.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -33,67 +33,67 @@ __FBSDID("$FreeBSD$"); */ #if !defined(KLD_MODULE) -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipdivert.h> -#include <freebsd/local/opt_ipdn.h> -#include <freebsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipdivert.h> +#include <rtems/bsd/local/opt_ipdn.h> +#include <rtems/bsd/local/opt_inet.h> #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ #endif -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/condvar.h> -#include <freebsd/sys/eventhandler.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/ucred.h> -#include <freebsd/net/ethernet.h> /* for ETHERTYPE_IP */ -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/pf_mtag.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netinet/ip_carp.h> -#include <freebsd/netinet/pim.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/udp.h> -#include <freebsd/netinet/udp_var.h> -#include <freebsd/netinet/sctp.h> - -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet/icmp6.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/condvar.h> +#include <sys/eventhandler.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/jail.h> +#include <sys/module.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <sys/ucred.h> +#include <net/ethernet.h> /* for ETHERTYPE_IP */ +#include <net/if.h> +#include <net/route.h> +#include <net/pf_mtag.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_var.h> +#include <netinet/in_pcb.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_icmp.h> +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netinet/ip_carp.h> +#include <netinet/pim.h> +#include <netinet/tcp_var.h> +#include <netinet/udp.h> +#include <netinet/udp_var.h> +#include <netinet/sctp.h> + +#include <netinet/ip6.h> +#include <netinet/icmp6.h> #ifdef INET6 -#include <freebsd/netinet6/scope6_var.h> -#include <freebsd/netinet6/ip6_var.h> +#include <netinet6/scope6_var.h> +#include <netinet6/ip6_var.h> #endif -#include <freebsd/machine/in_cksum.h> /* XXX for in_cksum */ +#include <machine/in_cksum.h> /* XXX for in_cksum */ #ifdef MAC -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #endif /* diff --git a/freebsd/sys/netinet/ipfw/ip_fw_log.c b/freebsd/sys/netinet/ipfw/ip_fw_log.c index 0a5cd94c..b529b9e1 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw_log.c +++ b/freebsd/sys/netinet/ipfw/ip_fw_log.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -33,47 +33,47 @@ __FBSDID("$FreeBSD$"); */ #if !defined(KLD_MODULE) -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipdivert.h> -#include <freebsd/local/opt_ipdn.h> -#include <freebsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipdivert.h> +#include <rtems/bsd/local/opt_ipdn.h> +#include <rtems/bsd/local/opt_inet.h> #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ #endif -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/net/ethernet.h> /* for ETHERTYPE_IP */ -#include <freebsd/net/if.h> -#include <freebsd/net/vnet.h> -#include <freebsd/net/if_types.h> /* for IFT_ETHER */ -#include <freebsd/net/bpf.h> /* for BPF */ - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/udp.h> - -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet/icmp6.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <sys/kernel.h> +#include <sys/socket.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <net/ethernet.h> /* for ETHERTYPE_IP */ +#include <net/if.h> +#include <net/vnet.h> +#include <net/if_types.h> /* for IFT_ETHER */ +#include <net/bpf.h> /* for BPF */ + +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/ip_icmp.h> +#include <netinet/ip_var.h> +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netinet/tcp_var.h> +#include <netinet/udp.h> + +#include <netinet/ip6.h> +#include <netinet/icmp6.h> #ifdef INET6 -#include <freebsd/netinet6/in6_var.h> /* ip6_sprintf() */ +#include <netinet6/in6_var.h> /* ip6_sprintf() */ #endif #ifdef MAC -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #endif /* diff --git a/freebsd/sys/netinet/ipfw/ip_fw_nat.c b/freebsd/sys/netinet/ipfw/ip_fw_nat.c index e6c8bcec..dd47dedc 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw_nat.c +++ b/freebsd/sys/netinet/ipfw/ip_fw_nat.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2008 Paolo Pisati @@ -26,33 +26,33 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/eventhandler.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/rwlock.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/eventhandler.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/module.h> +#include <sys/rwlock.h> #define IPFW_INTERNAL /* Access to protected data structures in ip_fw.h. */ -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> -#include <freebsd/net/if.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/udp.h> +#include <net/if.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netinet/tcp.h> +#include <netinet/udp.h> -#include <freebsd/machine/in_cksum.h> /* XXX for in_cksum */ +#include <machine/in_cksum.h> /* XXX for in_cksum */ static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); #define V_ifaddr_event_tag VNET(ifaddr_event_tag) diff --git a/freebsd/sys/netinet/ipfw/ip_fw_pfil.c b/freebsd/sys/netinet/ipfw/ip_fw_pfil.c index 8759f409..b32a08b7 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw_pfil.c +++ b/freebsd/sys/netinet/ipfw/ip_fw_pfil.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2004 Andre Oppermann, Internet Business Solutions AG @@ -26,44 +26,44 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #if !defined(KLD_MODULE) -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipdn.h> -#include <freebsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipdn.h> +#include <rtems/bsd/local/opt_inet.h> #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ #endif /* KLD_MODULE */ -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/sysctl.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/pfil.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> -#include <freebsd/netgraph/ng_ipfw.h> - -#include <freebsd/machine/in_cksum.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/module.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <sys/sysctl.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/pfil.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> +#include <netgraph/ng_ipfw.h> + +#include <machine/in_cksum.h> static VNET_DEFINE(int, fw_enable) = 1; #define V_fw_enable VNET(fw_enable) diff --git a/freebsd/sys/netinet/ipfw/ip_fw_sockopt.c b/freebsd/sys/netinet/ipfw/ip_fw_sockopt.c index 6af09905..b9635416 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw_sockopt.c +++ b/freebsd/sys/netinet/ipfw/ip_fw_sockopt.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -36,41 +36,41 @@ __FBSDID("$FreeBSD$"); */ #if !defined(KLD_MODULE) -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipdivert.h> -#include <freebsd/local/opt_ipdn.h> -#include <freebsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipdivert.h> +#include <rtems/bsd/local/opt_ipdn.h> +#include <rtems/bsd/local/opt_inet.h> #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ #endif -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> /* struct m_tag used by nested headers */ -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* hooks */ -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/netinet/ipfw/ip_fw_private.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> /* struct m_tag used by nested headers */ +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/ip_var.h> /* hooks */ +#include <netinet/ip_fw.h> +#include <netinet/ipfw/ip_fw_private.h> #ifdef MAC -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #endif MALLOC_DEFINE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's"); diff --git a/freebsd/sys/netinet/ipfw/ip_fw_table.c b/freebsd/sys/netinet/ipfw/ip_fw_table.c index 39a1dfcc..a399a7a0 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw_table.c +++ b/freebsd/sys/netinet/ipfw/ip_fw_table.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2004 Ruslan Ermilov and Vsevolod Lobko. @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -42,37 +42,37 @@ __FBSDID("$FreeBSD$"); */ #if !defined(KLD_MODULE) -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_ipdivert.h> -#include <freebsd/local/opt_ipdn.h> -#include <freebsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_ipdivert.h> +#include <rtems/bsd/local/opt_ipdn.h> +#include <rtems/bsd/local/opt_inet.h> #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ #endif -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/socket.h> -#include <freebsd/net/if.h> /* ip_fw.h requires IFNAMSIZ */ -#include <freebsd/net/radix.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip_var.h> /* struct ipfw_rule_ref */ -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/sys/queue.h> /* LIST_HEAD */ -#include <freebsd/netinet/ipfw/ip_fw_private.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/rwlock.h> +#include <sys/socket.h> +#include <net/if.h> /* ip_fw.h requires IFNAMSIZ */ +#include <net/radix.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/ip_var.h> /* struct ipfw_rule_ref */ +#include <netinet/ip_fw.h> +#include <sys/queue.h> /* LIST_HEAD */ +#include <netinet/ipfw/ip_fw_private.h> #ifdef MAC -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #endif MALLOC_DEFINE(M_IPFW_TBL, "ipfw_tbl", "IpFw tables"); diff --git a/freebsd/sys/netinet/libalias/alias.c b/freebsd/sys/netinet/libalias/alias.c index e5c5138d..9a8d29bd 100644 --- a/freebsd/sys/netinet/libalias/alias.c +++ b/freebsd/sys/netinet/libalias/alias.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 Charles Mott <cm@linktel.net> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -114,36 +114,36 @@ __FBSDID("$FreeBSD$"); */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/mbuf.h> +#include <sys/sysctl.h> #else -#include <freebsd/sys/types.h> -#include <freebsd/stdlib.h> -#include <freebsd/stdio.h> -#include <freebsd/ctype.h> -#include <freebsd/dlfcn.h> -#include <freebsd/errno.h> -#include <freebsd/string.h> +#include <rtems/bsd/sys/types.h> +#include <stdlib.h> +#include <stdio.h> +#include <ctype.h> +#include <dlfcn.h> +#include <errno.h> +#include <string.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/udp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/ip_icmp.h> +#include <netinet/tcp.h> +#include <netinet/udp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/err.h> -#include <freebsd/local/alias.h> -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <err.h> +#include <rtems/bsd/local/alias.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif /* diff --git a/freebsd/sys/netinet/libalias/alias.h b/freebsd/sys/netinet/libalias/alias.h index f835e1b7..2aed8293 100644 --- a/freebsd/sys/netinet/libalias/alias.h +++ b/freebsd/sys/netinet/libalias/alias.h @@ -36,12 +36,12 @@ * distribution. */ -#ifndef _ALIAS_HH_ -#define _ALIAS_HH_ +#ifndef _ALIAS_H_ +#define _ALIAS_H_ -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> #define LIBALIAS_BUF_SIZE 128 #ifdef _KERNEL @@ -227,6 +227,6 @@ struct mbuf *m_megapullup(struct mbuf *, int); #define PKT_ALIAS_UNRESOLVED_FRAGMENT 3 #define PKT_ALIAS_FOUND_HEADER_FRAGMENT 4 -#endif /* !_ALIAS_HH_ */ +#endif /* !_ALIAS_H_ */ /* lint -restore */ diff --git a/freebsd/sys/netinet/libalias/alias_cuseeme.c b/freebsd/sys/netinet/libalias/alias_cuseeme.c index 90f2aaae..0e04c3f4 100644 --- a/freebsd/sys/netinet/libalias/alias_cuseeme.c +++ b/freebsd/sys/netinet/libalias/alias_cuseeme.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org> @@ -28,31 +28,31 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/errno.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> +#include <errno.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/udp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/udp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif #define CUSEEME_PORT_NUMBER 7648 diff --git a/freebsd/sys/netinet/libalias/alias_db.c b/freebsd/sys/netinet/libalias/alias_db.c index 4b003366..35b1846b 100644 --- a/freebsd/sys/netinet/libalias/alias_db.c +++ b/freebsd/sys/netinet/libalias/alias_db.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 Charles Mott <cm@linktel.net> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -145,34 +145,34 @@ __FBSDID("$FreeBSD$"); */ #ifdef _KERNEL -#include <freebsd/machine/stdarg.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/syslog.h> +#include <machine/stdarg.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/module.h> +#include <sys/rwlock.h> +#include <sys/syslog.h> #else -#include <freebsd/stdarg.h> -#include <freebsd/stdlib.h> -#include <freebsd/stdio.h> -#include <freebsd/sys/errno.h> -#include <freebsd/sys/time.h> -#include <freebsd/unistd.h> +#include <stdarg.h> +#include <stdlib.h> +#include <stdio.h> +#include <rtems/bsd/sys/errno.h> +#include <rtems/bsd/sys/time.h> +#include <unistd.h> #endif -#include <freebsd/sys/socket.h> -#include <freebsd/netinet/tcp.h> +#include <sys/socket.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> -#include <freebsd/net/if.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> +#include <net/if.h> #else -#include <freebsd/local/alias.h> -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif static LIST_HEAD(, libalias) instancehead = LIST_HEAD_INITIALIZER(instancehead); @@ -2646,10 +2646,10 @@ LibAliasCheckNewLink(struct libalias *la) ****************/ /* Firewall include files */ -#include <freebsd/net/if.h> -#include <freebsd/netinet/ip_fw.h> -#include <freebsd/string.h> -#include <freebsd/err.h> +#include <net/if.h> +#include <netinet/ip_fw.h> +#include <string.h> +#include <err.h> /* * helper function, updates the pointer to cmd with the length diff --git a/freebsd/sys/netinet/libalias/alias_dummy.c b/freebsd/sys/netinet/libalias/alias_dummy.c index c5a316d4..d544e6e3 100644 --- a/freebsd/sys/netinet/libalias/alias_dummy.c +++ b/freebsd/sys/netinet/libalias/alias_dummy.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2005 Paolo Pisati <piso@FreeBSD.org> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -36,26 +36,26 @@ __FBSDID("$FreeBSD$"); */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/errno.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> +#include <errno.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/udp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/udp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif static void diff --git a/freebsd/sys/netinet/libalias/alias_ftp.c b/freebsd/sys/netinet/libalias/alias_ftp.c index 4e8b7177..c8a09413 100644 --- a/freebsd/sys/netinet/libalias/alias_ftp.c +++ b/freebsd/sys/netinet/libalias/alias_ftp.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 Charles Mott <cm@linktel.net> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -72,31 +72,31 @@ __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/ctype.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/ctype.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/ctype.h> -#include <freebsd/errno.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> -#include <freebsd/string.h> +#include <ctype.h> +#include <errno.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> +#include <string.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/tcp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif #define FTP_CONTROL_PORT_NUMBER 21 diff --git a/freebsd/sys/netinet/libalias/alias_irc.c b/freebsd/sys/netinet/libalias/alias_irc.c index 05db0f4f..084301be 100644 --- a/freebsd/sys/netinet/libalias/alias_irc.c +++ b/freebsd/sys/netinet/libalias/alias_irc.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 Charles Mott <cm@linktel.net> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* Alias_irc.c intercepts packages contain IRC CTCP commands, and @@ -51,34 +51,34 @@ __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/ctype.h> -#include <freebsd/sys/limits.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/ctype.h> +#include <sys/limits.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/ctype.h> -#include <freebsd/errno.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> -#include <freebsd/stdlib.h> -#include <freebsd/string.h> -#include <freebsd/limits.h> +#include <ctype.h> +#include <errno.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <limits.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/tcp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif #define IRC_CONTROL_PORT_NUMBER_1 6667 diff --git a/freebsd/sys/netinet/libalias/alias_local.h b/freebsd/sys/netinet/libalias/alias_local.h index e24ece49..68839da3 100644 --- a/freebsd/sys/netinet/libalias/alias_local.h +++ b/freebsd/sys/netinet/libalias/alias_local.h @@ -43,24 +43,24 @@ * <updated several times by original author and Eivind Eklund> */ -#ifndef _ALIAS_LOCAL_HH_ -#define _ALIAS_LOCAL_HH_ +#ifndef _ALIAS_LOCAL_H_ +#define _ALIAS_LOCAL_H_ -#include <freebsd/sys/types.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/types.h> +#include <sys/sysctl.h> #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> +#include <sys/malloc.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> /* XXX: LibAliasSetTarget() uses this constant. */ #define INADDR_NONE 0xffffffff -#include <freebsd/netinet/libalias/alias_sctp.h> +#include <netinet/libalias/alias_sctp.h> #else -#include <freebsd/local/alias_sctp.h> +#include <rtems/bsd/local/alias_sctp.h> #endif /* Sizes of input and output link tables */ @@ -368,7 +368,7 @@ enum alias_tcp_state { ALIAS_TCP_STATE_DISCONNECTED }; -#if defined(_NETINET_IP_HH_) +#if defined(_NETINET_IP_H_) static __inline void * ip_next(struct ip *iphdr) { @@ -377,7 +377,7 @@ ip_next(struct ip *iphdr) } #endif -#if defined(_NETINET_TCP_HH_) +#if defined(_NETINET_TCP_H_) static __inline void * tcp_next(struct tcphdr *tcphdr) { @@ -386,7 +386,7 @@ tcp_next(struct tcphdr *tcphdr) } #endif -#if defined(_NETINET_UDP_HH_) +#if defined(_NETINET_UDP_H_) static __inline void * udp_next(struct udphdr *udphdr) { @@ -394,4 +394,4 @@ udp_next(struct udphdr *udphdr) } #endif -#endif /* !_ALIAS_LOCAL_HH_ */ +#endif /* !_ALIAS_LOCAL_H_ */ diff --git a/freebsd/sys/netinet/libalias/alias_mod.c b/freebsd/sys/netinet/libalias/alias_mod.c index fa15b2e4..cb567473 100644 --- a/freebsd/sys/netinet/libalias/alias_mod.c +++ b/freebsd/sys/netinet/libalias/alias_mod.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2005 Paolo Pisati <piso@FreeBSD.org> @@ -26,31 +26,31 @@ * SUCH DAMAGE. * */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifdef _KERNEL -#include <freebsd/sys/libkern.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/rwlock.h> +#include <sys/libkern.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/rwlock.h> #else -#include <freebsd/stdio.h> -#include <freebsd/string.h> -#include <freebsd/sys/types.h> -#include <freebsd/errno.h> +#include <stdio.h> +#include <string.h> +#include <rtems/bsd/sys/types.h> +#include <errno.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif /* Protocol and userland module handlers chains. */ diff --git a/freebsd/sys/netinet/libalias/alias_mod.h b/freebsd/sys/netinet/libalias/alias_mod.h index f5f98cc3..995f61ac 100644 --- a/freebsd/sys/netinet/libalias/alias_mod.h +++ b/freebsd/sys/netinet/libalias/alias_mod.h @@ -31,14 +31,14 @@ * modular framework */ -#ifndef _ALIAS_MOD_HH_ -#define _ALIAS_MOD_HH_ +#ifndef _ALIAS_MOD_H_ +#define _ALIAS_MOD_H_ #ifdef _KERNEL MALLOC_DECLARE(M_ALIAS); /* Use kernel allocator. */ -#if defined(_SYS_MALLOC_HH_) +#if defined(_SYS_MALLOC_H_) #ifndef __rtems__ #define malloc(x) malloc(x, M_ALIAS, M_NOWAIT|M_ZERO) #define calloc(x, n) malloc(x*n) @@ -160,4 +160,4 @@ typedef struct moduledata { } moduledata_t; #endif -#endif /* !_ALIAS_MOD_HH_ */ +#endif /* !_ALIAS_MOD_H_ */ diff --git a/freebsd/sys/netinet/libalias/alias_nbt.c b/freebsd/sys/netinet/libalias/alias_nbt.c index 31ee0006..f4ae9af7 100644 --- a/freebsd/sys/netinet/libalias/alias_nbt.c +++ b/freebsd/sys/netinet/libalias/alias_nbt.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Written by Atsushi Murai <amurai@spec.co.jp> @@ -30,7 +30,7 @@ * oConsidering for word alignment for other platform. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -44,28 +44,28 @@ __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/errno.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> -#include <freebsd/strings.h> +#include <errno.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> +#include <strings.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/udp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/udp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif #define NETBIOS_NS_PORT_NUMBER 137 diff --git a/freebsd/sys/netinet/libalias/alias_pptp.c b/freebsd/sys/netinet/libalias/alias_pptp.c index f6c7f199..61f89392 100644 --- a/freebsd/sys/netinet/libalias/alias_pptp.c +++ b/freebsd/sys/netinet/libalias/alias_pptp.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * alias_pptp.c @@ -38,32 +38,32 @@ * Author: Erik Salander <erik@whistle.com> */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* Includes */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/limits.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/limits.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/errno.h> -#include <freebsd/limits.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> +#include <errno.h> +#include <limits.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> #endif -#include <freebsd/netinet/tcp.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias.h> -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif #define PPTP_CONTROL_PORT_NUMBER 1723 diff --git a/freebsd/sys/netinet/libalias/alias_proxy.c b/freebsd/sys/netinet/libalias/alias_proxy.c index f4f2b643..cbd4b99b 100644 --- a/freebsd/sys/netinet/libalias/alias_proxy.c +++ b/freebsd/sys/netinet/libalias/alias_proxy.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 Charles Mott <cm@linktel.net> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* file: alias_proxy.c @@ -57,29 +57,29 @@ __FBSDID("$FreeBSD$"); /* System includes */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/ctype.h> -#include <freebsd/sys/libkern.h> -#include <freebsd/sys/limits.h> +#include <rtems/bsd/sys/param.h> +#include <sys/ctype.h> +#include <sys/libkern.h> +#include <sys/limits.h> #else -#include <freebsd/sys/types.h> -#include <freebsd/ctype.h> -#include <freebsd/stdio.h> -#include <freebsd/stdlib.h> -#include <freebsd/netdb.h> -#include <freebsd/string.h> +#include <rtems/bsd/sys/types.h> +#include <ctype.h> +#include <stdio.h> +#include <stdlib.h> +#include <netdb.h> +#include <string.h> #endif -#include <freebsd/netinet/tcp.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/arpa/inet.h> -#include <freebsd/local/alias.h> /* Public API functions for libalias */ -#include <freebsd/local/alias_local.h> /* Functions used by alias*.c */ +#include <arpa/inet.h> +#include <rtems/bsd/local/alias.h> /* Public API functions for libalias */ +#include <rtems/bsd/local/alias_local.h> /* Functions used by alias*.c */ #endif /* diff --git a/freebsd/sys/netinet/libalias/alias_sctp.c b/freebsd/sys/netinet/libalias/alias_sctp.c index cdec258c..fed592f0 100644 --- a/freebsd/sys/netinet/libalias/alias_sctp.c +++ b/freebsd/sys/netinet/libalias/alias_sctp.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2008 @@ -73,24 +73,24 @@ /* $FreeBSD$ */ #ifdef _KERNEL -#include <freebsd/machine/stdarg.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/netinet/libalias/alias_sctp.h> -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/sctp_crc32.h> -#include <freebsd/machine/in_cksum.h> +#include <machine/stdarg.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/module.h> +#include <sys/syslog.h> +#include <netinet/libalias/alias_sctp.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/sctp_crc32.h> +#include <machine/in_cksum.h> #else -#include <freebsd/local/alias_sctp.h> -#include <freebsd/arpa/inet.h> -#include <freebsd/local/alias.h> -#include <freebsd/local/alias_local.h> -#include <freebsd/machine/in_cksum.h> -#include <freebsd/sys/libkern.h> +#include <rtems/bsd/local/alias_sctp.h> +#include <arpa/inet.h> +#include <rtems/bsd/local/alias.h> +#include <rtems/bsd/local/alias_local.h> +#include <machine/in_cksum.h> +#include <sys/libkern.h> #endif //#ifdef _KERNEL /* ---------------------------------------------------------------------- @@ -185,11 +185,11 @@ void SctpShowAliasStats(struct libalias *la); MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs"); /* Use kernel allocator. */ -#ifdef _SYS_MALLOC_HH_ +#ifdef _SYS_MALLOC_H_ #define sn_malloc(x) malloc(x, M_SCTPNAT, M_NOWAIT|M_ZERO) #define sn_calloc(n,x) sn_malloc(x * n) #define sn_free(x) free(x, M_SCTPNAT) -#endif// #ifdef _SYS_MALLOC_HH_ +#endif// #ifdef _SYS_MALLOC_H_ #else //#ifdef _KERNEL #define sn_malloc(x) malloc(x) diff --git a/freebsd/sys/netinet/libalias/alias_sctp.h b/freebsd/sys/netinet/libalias/alias_sctp.h index 9ea21959..b6ad6f17 100644 --- a/freebsd/sys/netinet/libalias/alias_sctp.h +++ b/freebsd/sys/netinet/libalias/alias_sctp.h @@ -47,36 +47,36 @@ /* $FreeBSD$ */ -#ifndef _ALIAS_SCTP_HH_ -#define _ALIAS_SCTP_HH_ +#ifndef _ALIAS_SCTP_H_ +#define _ALIAS_SCTP_H_ -#include <freebsd/sys/param.h> +#include <rtems/bsd/sys/param.h> #ifdef _KERNEL -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/uio.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/syslog.h> +#include <sys/malloc.h> +#include <sys/module.h> +#include <sys/kernel.h> +#include <sys/proc.h> +#include <sys/uio.h> +#include <sys/socketvar.h> +#include <sys/syslog.h> #endif // #ifdef _KERNEL -#include <freebsd/sys/types.h> +#include <rtems/bsd/sys/types.h> -#include <freebsd/sys/queue.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/time.h> +#include <sys/queue.h> +#include <rtems/bsd/sys/types.h> +#include <rtems/bsd/sys/time.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> /** * These are defined in sctp_os_bsd.h, but it can't be included due to its local file * inclusion, so I'm defining them here. * */ -#include <freebsd/machine/cpufunc.h> -#include <freebsd/machine/cpu.h> +#include <machine/cpufunc.h> +#include <machine/cpu.h> /* The packed define for 64 bit platforms */ #ifndef SCTP_PACKED #define SCTP_PACKED __attribute__((packed)) @@ -86,14 +86,14 @@ #endif //#ifndef SCTP_UNUSED -#include <freebsd/netinet/sctp.h> -//#include <freebsd/netinet/sctp_os_bsd.h> --might be needed later for mbuf stuff -#include <freebsd/netinet/sctp_header.h> +#include <netinet/sctp.h> +//#include <netinet/sctp_os_bsd.h> --might be needed later for mbuf stuff +#include <netinet/sctp_header.h> #ifndef _KERNEL -#include <freebsd/stdlib.h> -#include <freebsd/stdio.h> -#include <freebsd/curses.h> +#include <stdlib.h> +#include <stdio.h> +#include <curses.h> #endif //#ifdef _KERNEL diff --git a/freebsd/sys/netinet/libalias/alias_skinny.c b/freebsd/sys/netinet/libalias/alias_skinny.c index 4d311efe..d472d307 100644 --- a/freebsd/sys/netinet/libalias/alias_skinny.c +++ b/freebsd/sys/netinet/libalias/alias_skinny.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * alias_skinny.c @@ -33,26 +33,26 @@ */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/errno.h> -#include <freebsd/stdio.h> -#include <freebsd/unistd.h> +#include <errno.h> +#include <stdio.h> +#include <unistd.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/tcp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif static void diff --git a/freebsd/sys/netinet/libalias/alias_smedia.c b/freebsd/sys/netinet/libalias/alias_smedia.c index 3d558a94..eed1c49f 100644 --- a/freebsd/sys/netinet/libalias/alias_smedia.c +++ b/freebsd/sys/netinet/libalias/alias_smedia.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /* * alias_smedia.c @@ -65,7 +65,7 @@ * <junichi@junichi.org> */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -101,29 +101,29 @@ __FBSDID("$FreeBSD$"); */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/module.h> #else -#include <freebsd/errno.h> -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> -#include <freebsd/string.h> +#include <errno.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> +#include <string.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/tcp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> -#include <freebsd/netinet/libalias/alias_mod.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> +#include <netinet/libalias/alias_mod.h> #else -#include <freebsd/local/alias_local.h> -#include <freebsd/local/alias_mod.h> +#include <rtems/bsd/local/alias_local.h> +#include <rtems/bsd/local/alias_mod.h> #endif #define RTSP_CONTROL_PORT_NUMBER_1 554 diff --git a/freebsd/sys/netinet/libalias/alias_util.c b/freebsd/sys/netinet/libalias/alias_util.c index 1e0c95ae..066146c8 100644 --- a/freebsd/sys/netinet/libalias/alias_util.c +++ b/freebsd/sys/netinet/libalias/alias_util.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 Charles Mott <cm@linktel.net> @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -46,24 +46,24 @@ __FBSDID("$FreeBSD$"); */ #ifdef _KERNEL -#include <freebsd/sys/param.h> -#include <freebsd/sys/proc.h> +#include <rtems/bsd/sys/param.h> +#include <sys/proc.h> #else -#include <freebsd/sys/types.h> -#include <freebsd/stdio.h> +#include <rtems/bsd/sys/types.h> +#include <stdio.h> #endif -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/tcp.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/netinet/libalias/alias.h> -#include <freebsd/netinet/libalias/alias_local.h> +#include <netinet/libalias/alias.h> +#include <netinet/libalias/alias_local.h> #else -#include <freebsd/local/alias.h> -#include <freebsd/local/alias_local.h> +#include <rtems/bsd/local/alias.h> +#include <rtems/bsd/local/alias_local.h> #endif /* diff --git a/freebsd/sys/netinet/pim.h b/freebsd/sys/netinet/pim.h index 2f887cc2..2b52a447 100644 --- a/freebsd/sys/netinet/pim.h +++ b/freebsd/sys/netinet/pim.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_PIM_HH_ -#define _NETINET_PIM_HH_ +#ifndef _NETINET_PIM_H_ +#define _NETINET_PIM_H_ /* * Protocol Independent Multicast (PIM) definitions. @@ -42,7 +42,7 @@ * Modified by Pavlin Radoslavov, USC/ISI, May 1998, October 2000. */ -#include <freebsd/sys/types.h> +#include <rtems/bsd/sys/types.h> #ifndef _PIM_VT #ifndef BYTE_ORDER @@ -116,4 +116,4 @@ struct pim { {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d }}} -#endif /* _NETINET_PIM_HH_ */ +#endif /* _NETINET_PIM_H_ */ diff --git a/freebsd/sys/netinet/pim_var.h b/freebsd/sys/netinet/pim_var.h index 9d80bbb2..41657b61 100644 --- a/freebsd/sys/netinet/pim_var.h +++ b/freebsd/sys/netinet/pim_var.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_PIM_VAR_HH_ -#define _NETINET_PIM_VAR_HH_ +#ifndef _NETINET_PIM_VAR_H_ +#define _NETINET_PIM_VAR_H_ /* * Protocol Independent Multicast (PIM), @@ -81,4 +81,4 @@ void pim_input(struct mbuf *, int); SYSCTL_DECL(_net_inet_pim); #endif -#endif /* _NETINET_PIM_VAR_HH_ */ +#endif /* _NETINET_PIM_VAR_H_ */ diff --git a/freebsd/sys/netinet/raw_ip.c b/freebsd/sys/netinet/raw_ip.c index fb90880f..408b529b 100644 --- a/freebsd/sys/netinet/raw_ip.c +++ b/freebsd/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -32,48 +32,48 @@ * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sx.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_mroute.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/rwlock.h> +#include <sys/signalvar.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sx.h> +#include <sys/sysctl.h> +#include <sys/systm.h> + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_pcb.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_mroute.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> +#include <netipsec/ipsec.h> #endif /*IPSEC*/ -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> VNET_DEFINE(struct inpcbhead, ripcb); VNET_DEFINE(struct inpcbinfo, ripcbinfo); diff --git a/freebsd/sys/netinet/sctp.h b/freebsd/sys/netinet/sctp.h index bf188a23..09e2e465 100644 --- a/freebsd/sys/netinet/sctp.h +++ b/freebsd/sys/netinet/sctp.h @@ -29,13 +29,13 @@ */ /* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#ifndef _NETINET_SCTP_HH_ -#define _NETINET_SCTP_HH_ +#ifndef _NETINET_SCTP_H_ +#define _NETINET_SCTP_H_ -#include <freebsd/sys/types.h> +#include <rtems/bsd/sys/types.h> #define SCTP_PACKED __attribute__((packed)) @@ -491,7 +491,7 @@ struct sctp_error_unrecognized_chunk { #define SCTP_SMALLEST_PMTU 512 /* smallest pmtu allowed when disabling PMTU * discovery */ -#include <freebsd/netinet/sctp_uio.h> +#include <netinet/sctp_uio.h> /* This dictates the size of the packet * collection buffer. This only applies @@ -546,4 +546,4 @@ struct sctp_error_unrecognized_chunk { #undef SCTP_PACKED -#endif /* !_NETINET_SCTP_HH_ */ +#endif /* !_NETINET_SCTP_H_ */ diff --git a/freebsd/sys/netinet/sctp_asconf.c b/freebsd/sys/netinet/sctp_asconf.c index 206cf600..3c24b75d 100644 --- a/freebsd/sys/netinet/sctp_asconf.c +++ b/freebsd/sys/netinet/sctp_asconf.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -32,17 +32,17 @@ /* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_timer.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_header.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_timer.h> /* * debug flags: diff --git a/freebsd/sys/netinet/sctp_asconf.h b/freebsd/sys/netinet/sctp_asconf.h index ff8cf378..bf3d5665 100644 --- a/freebsd/sys/netinet/sctp_asconf.h +++ b/freebsd/sys/netinet/sctp_asconf.h @@ -30,11 +30,11 @@ /* $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#ifndef _NETINET_SCTP_ASCONF_HH_ -#define _NETINET_SCTP_ASCONF_HH_ +#ifndef _NETINET_SCTP_ASCONF_H_ +#define _NETINET_SCTP_ASCONF_H_ #if defined(_KERNEL) || defined(__Userspace__) @@ -93,4 +93,4 @@ extern int #endif /* _KERNEL */ -#endif /* !_NETINET_SCTP_ASCONF_HH_ */ +#endif /* !_NETINET_SCTP_ASCONF_H_ */ diff --git a/freebsd/sys/netinet/sctp_auth.c b/freebsd/sys/netinet/sctp_auth.c index 6c2bf908..cf4ebaa9 100644 --- a/freebsd/sys/netinet/sctp_auth.c +++ b/freebsd/sys/netinet/sctp_auth.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. @@ -30,19 +30,19 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_auth.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_auth.h> #ifdef SCTP_DEBUG #define SCTP_AUTH_DEBUG (SCTP_BASE_SYSCTL(sctp_debug_on) & SCTP_DEBUG_AUTH1) diff --git a/freebsd/sys/netinet/sctp_auth.h b/freebsd/sys/netinet/sctp_auth.h index da4dc09b..36535357 100644 --- a/freebsd/sys/netinet/sctp_auth.h +++ b/freebsd/sys/netinet/sctp_auth.h @@ -28,7 +28,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __SCTP_AUTH_HH__ diff --git a/freebsd/sys/netinet/sctp_bsd_addr.c b/freebsd/sys/netinet/sctp_bsd_addr.c index 8782e681..8612adc9 100644 --- a/freebsd/sys/netinet/sctp_bsd_addr.c +++ b/freebsd/sys/netinet/sctp_bsd_addr.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -32,23 +32,23 @@ /* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_bsd_addr.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/sys/unistd.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_header.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_bsd_addr.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_indata.h> +#include <rtems/bsd/sys/unistd.h> /* Declare all of our malloc named types */ MALLOC_DEFINE(SCTP_M_MAP, "sctp_map", "sctp asoc map descriptor"); diff --git a/freebsd/sys/netinet/sctp_bsd_addr.h b/freebsd/sys/netinet/sctp_bsd_addr.h index 67d65dc6..ae2fa525 100644 --- a/freebsd/sys/netinet/sctp_bsd_addr.h +++ b/freebsd/sys/netinet/sctp_bsd_addr.h @@ -28,12 +28,12 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_bsd_addr_h__ #define __sctp_bsd_addr_h__ -#include <freebsd/netinet/sctp_pcb.h> +#include <netinet/sctp_pcb.h> #if defined(_KERNEL) || defined(__Userspace__) diff --git a/freebsd/sys/netinet/sctp_cc_functions.c b/freebsd/sys/netinet/sctp_cc_functions.c index 668fd673..e0f8beae 100644 --- a/freebsd/sys/netinet/sctp_cc_functions.c +++ b/freebsd/sys/netinet/sctp_cc_functions.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -30,21 +30,21 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_input.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_auth.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_cc_functions.h> -#include <freebsd/sys/cdefs.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_header.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_input.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_auth.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_cc_functions.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); void diff --git a/freebsd/sys/netinet/sctp_cc_functions.h b/freebsd/sys/netinet/sctp_cc_functions.h index 3b95d7de..1a681ada 100644 --- a/freebsd/sys/netinet/sctp_cc_functions.h +++ b/freebsd/sys/netinet/sctp_cc_functions.h @@ -27,7 +27,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_cc_functions_h__ diff --git a/freebsd/sys/netinet/sctp_constants.h b/freebsd/sys/netinet/sctp_constants.h index c4f4be23..212a2f9e 100644 --- a/freebsd/sys/netinet/sctp_constants.h +++ b/freebsd/sys/netinet/sctp_constants.h @@ -30,7 +30,7 @@ /* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_constants_h__ diff --git a/freebsd/sys/netinet/sctp_crc32.c b/freebsd/sys/netinet/sctp_crc32.c index aa4c08cf..3d07f505 100644 --- a/freebsd/sys/netinet/sctp_crc32.c +++ b/freebsd/sys/netinet/sctp_crc32.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -33,13 +33,13 @@ /* $KAME: sctp_crc32.c,v 1.12 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_crc32.h> -#include <freebsd/netinet/sctp_pcb.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp.h> +#include <netinet/sctp_crc32.h> +#include <netinet/sctp_pcb.h> #if !defined(SCTP_WITH_NO_CSUM) diff --git a/freebsd/sys/netinet/sctp_crc32.h b/freebsd/sys/netinet/sctp_crc32.h index 768b25d5..eb7a1bc7 100644 --- a/freebsd/sys/netinet/sctp_crc32.h +++ b/freebsd/sys/netinet/sctp_crc32.h @@ -30,7 +30,7 @@ /* $KAME: sctp_crc32.h,v 1.5 2004/08/17 04:06:16 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __crc32c_h__ diff --git a/freebsd/sys/netinet/sctp_header.h b/freebsd/sys/netinet/sctp_header.h index 141bfcda..980845dc 100644 --- a/freebsd/sys/netinet/sctp_header.h +++ b/freebsd/sys/netinet/sctp_header.h @@ -30,15 +30,15 @@ /* $KAME: sctp_header.h,v 1.14 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_header_h__ #define __sctp_header_h__ -#include <freebsd/sys/time.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_constants.h> +#include <rtems/bsd/sys/time.h> +#include <netinet/sctp.h> +#include <netinet/sctp_constants.h> #define SCTP_PACKED __attribute__((packed)) diff --git a/freebsd/sys/netinet/sctp_indata.c b/freebsd/sys/netinet/sctp_indata.c index 963b3205..082e43b8 100644 --- a/freebsd/sys/netinet/sctp_indata.c +++ b/freebsd/sys/netinet/sctp_indata.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -32,20 +32,20 @@ /* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_input.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctp_timer.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_header.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_input.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctp_timer.h> /* diff --git a/freebsd/sys/netinet/sctp_indata.h b/freebsd/sys/netinet/sctp_indata.h index a231ecaf..79978a5c 100644 --- a/freebsd/sys/netinet/sctp_indata.h +++ b/freebsd/sys/netinet/sctp_indata.h @@ -30,7 +30,7 @@ /* $KAME: sctp_indata.h,v 1.9 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_indata_h__ diff --git a/freebsd/sys/netinet/sctp_input.c b/freebsd/sys/netinet/sctp_input.c index 080813b4..965bec86 100644 --- a/freebsd/sys/netinet/sctp_input.c +++ b/freebsd/sys/netinet/sctp_input.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. @@ -32,24 +32,24 @@ /* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_input.h> -#include <freebsd/netinet/sctp_auth.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_bsd_addr.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_crc32.h> -#include <freebsd/netinet/udp.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_header.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_input.h> +#include <netinet/sctp_auth.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_bsd_addr.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_crc32.h> +#include <netinet/udp.h> diff --git a/freebsd/sys/netinet/sctp_input.h b/freebsd/sys/netinet/sctp_input.h index 90cd098a..39f64207 100644 --- a/freebsd/sys/netinet/sctp_input.h +++ b/freebsd/sys/netinet/sctp_input.h @@ -30,7 +30,7 @@ /* $KAME: sctp_input.h,v 1.6 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_input_h__ diff --git a/freebsd/sys/netinet/sctp_lock_bsd.h b/freebsd/sys/netinet/sctp_lock_bsd.h index 81e4a35f..dd9c2ce5 100644 --- a/freebsd/sys/netinet/sctp_lock_bsd.h +++ b/freebsd/sys/netinet/sctp_lock_bsd.h @@ -68,7 +68,7 @@ * SCTP_INP_INFO_RLOCK() and then when we want to add a new association to * the SCTP_BASE_INFO() list's we will do a SCTP_INP_INFO_WLOCK(). */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); diff --git a/freebsd/sys/netinet/sctp_os.h b/freebsd/sys/netinet/sctp_os.h index c1a392f0..fb7c5360 100644 --- a/freebsd/sys/netinet/sctp_os.h +++ b/freebsd/sys/netinet/sctp_os.h @@ -27,7 +27,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_os_h__ #define __sctp_os_h__ @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); * SCTP_ZONE_DESTROY(zone) */ -#include <freebsd/netinet/sctp_os_bsd.h> +#include <netinet/sctp_os_bsd.h> diff --git a/freebsd/sys/netinet/sctp_os_bsd.h b/freebsd/sys/netinet/sctp_os_bsd.h index cf29776f..991daca2 100644 --- a/freebsd/sys/netinet/sctp_os_bsd.h +++ b/freebsd/sys/netinet/sctp_os_bsd.h @@ -27,78 +27,78 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_os_bsd_h__ #define __sctp_os_bsd_h__ /* * includes */ -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_compat.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_sctp.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/ktr.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/resourcevar.h> -#include <freebsd/sys/uio.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/kthread.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/random.h> -#include <freebsd/sys/limits.h> -#include <freebsd/sys/queue.h> -#include <freebsd/machine/cpu.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/if_var.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/icmp_var.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_compat.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_sctp.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/ktr.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/mbuf.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/jail.h> +#include <sys/sysctl.h> +#include <sys/resourcevar.h> +#include <sys/uio.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/rwlock.h> +#include <sys/kthread.h> +#include <sys/priv.h> +#include <sys/random.h> +#include <sys/limits.h> +#include <sys/queue.h> +#include <machine/cpu.h> + +#include <net/if.h> +#include <net/if_types.h> +#include <net/if_var.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> +#include <netinet/ip_icmp.h> +#include <netinet/icmp_var.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/key.h> +#include <netipsec/ipsec.h> +#include <netipsec/key.h> #endif /* IPSEC */ #ifdef INET6 -#include <freebsd/sys/domain.h> +#include <sys/domain.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec6.h> +#include <netipsec/ipsec6.h> #endif -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/in6_pcb.h> -#include <freebsd/netinet/icmp6.h> -#include <freebsd/netinet6/ip6protosw.h> -#include <freebsd/netinet6/nd6.h> -#include <freebsd/netinet6/scope6_var.h> +#include <netinet/ip6.h> +#include <netinet6/ip6_var.h> +#include <netinet6/in6_pcb.h> +#include <netinet/icmp6.h> +#include <netinet6/ip6protosw.h> +#include <netinet6/nd6.h> +#include <netinet6/scope6_var.h> #endif /* INET6 */ -#include <freebsd/netinet/ip_options.h> +#include <netinet/ip_options.h> #ifndef in6pcb #define in6pcb inpcb @@ -249,7 +249,7 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT); /* * zone allocation functions */ -#include <freebsd/vm/uma.h> +#include <vm/uma.h> /* SCTP_ZONE_INIT: initialize the zone */ typedef struct uma_zone *sctp_zone_t; @@ -278,7 +278,7 @@ typedef struct uma_zone *sctp_zone_t; /* * timers */ -#include <freebsd/sys/callout.h> +#include <sys/callout.h> typedef struct callout sctp_os_timer_t; @@ -466,9 +466,9 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, #define SCTP_READ_RANDOM(buf, len) read_random(buf, len) #ifdef USE_SCTP_SHA1 -#include <freebsd/netinet/sctp_sha1.h> +#include <netinet/sctp_sha1.h> #else -#include <freebsd/crypto/sha1.h> +#include <crypto/sha1.h> /* map standard crypto API names */ #define SHA1_Init SHA1Init #define SHA1_Update SHA1Update @@ -476,7 +476,7 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, #endif #if defined(HAVE_SHA2) -#include <freebsd/crypto/sha2/sha2.h> +#include <crypto/sha2/sha2.h> #endif #endif diff --git a/freebsd/sys/netinet/sctp_output.c b/freebsd/sys/netinet/sctp_output.c index 9acd3288..648a87a2 100644 --- a/freebsd/sys/netinet/sctp_output.c +++ b/freebsd/sys/netinet/sctp_output.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. @@ -32,28 +32,28 @@ /* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/sys/proc.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_auth.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_bsd_addr.h> -#include <freebsd/netinet/sctp_input.h> -#include <freebsd/netinet/sctp_crc32.h> -#include <freebsd/netinet/udp.h> -#include <freebsd/machine/in_cksum.h> +#include <netinet/sctp_os.h> +#include <sys/proc.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_auth.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_bsd_addr.h> +#include <netinet/sctp_input.h> +#include <netinet/sctp_crc32.h> +#include <netinet/udp.h> +#include <machine/in_cksum.h> diff --git a/freebsd/sys/netinet/sctp_output.h b/freebsd/sys/netinet/sctp_output.h index d9051ee7..d655c3aa 100644 --- a/freebsd/sys/netinet/sctp_output.h +++ b/freebsd/sys/netinet/sctp_output.h @@ -30,13 +30,13 @@ /* $KAME: sctp_output.h,v 1.14 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_output_h__ #define __sctp_output_h__ -#include <freebsd/netinet/sctp_header.h> +#include <netinet/sctp_header.h> #if defined(_KERNEL) || defined(__Userspace__) diff --git a/freebsd/sys/netinet/sctp_pcb.c b/freebsd/sys/netinet/sctp_pcb.c index fccbda00..98c5b707 100644 --- a/freebsd/sys/netinet/sctp_pcb.c +++ b/freebsd/sys/netinet/sctp_pcb.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. @@ -32,22 +32,22 @@ /* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/sys/proc.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_bsd_addr.h> -#include <freebsd/netinet/udp.h> +#include <netinet/sctp_os.h> +#include <sys/proc.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctputil.h> +#include <netinet/sctp.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_bsd_addr.h> +#include <netinet/udp.h> VNET_DEFINE(struct sctp_base_info, system_base_info); diff --git a/freebsd/sys/netinet/sctp_pcb.h b/freebsd/sys/netinet/sctp_pcb.h index a4f4d30c..23ebc4f1 100644 --- a/freebsd/sys/netinet/sctp_pcb.h +++ b/freebsd/sys/netinet/sctp_pcb.h @@ -30,16 +30,16 @@ /* $KAME: sctp_pcb.h,v 1.21 2005/07/16 01:18:47 suz Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_pcb_h__ #define __sctp_pcb_h__ -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_constants.h> -#include <freebsd/netinet/sctp_sysctl.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp.h> +#include <netinet/sctp_constants.h> +#include <netinet/sctp_sysctl.h> LIST_HEAD(sctppcbhead, sctp_inpcb); LIST_HEAD(sctpasochead, sctp_tcb); @@ -51,8 +51,8 @@ LIST_HEAD(sctp_ifalist, sctp_ifa); TAILQ_HEAD(sctp_readhead, sctp_queued_to_read); TAILQ_HEAD(sctp_streamhead, sctp_stream_queue_pending); -#include <freebsd/netinet/sctp_structs.h> -#include <freebsd/netinet/sctp_auth.h> +#include <netinet/sctp_structs.h> +#include <netinet/sctp_auth.h> #define SCTP_PCBHASH_ALLADDR(port, mask) (port & mask) #define SCTP_PCBHASH_ASOC(tag, mask) (tag & mask) @@ -450,7 +450,7 @@ struct sctp_tcb { -#include <freebsd/netinet/sctp_lock_bsd.h> +#include <netinet/sctp_lock_bsd.h> /* TODO where to put non-_KERNEL things for __Userspace__? */ diff --git a/freebsd/sys/netinet/sctp_peeloff.c b/freebsd/sys/netinet/sctp_peeloff.c index 7b859bba..bc5f8a4f 100644 --- a/freebsd/sys/netinet/sctp_peeloff.c +++ b/freebsd/sys/netinet/sctp_peeloff.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -33,19 +33,19 @@ /* $KAME: sctp_peeloff.c,v 1.13 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctp_peeloff.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_auth.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctp_peeloff.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_auth.h> int diff --git a/freebsd/sys/netinet/sctp_peeloff.h b/freebsd/sys/netinet/sctp_peeloff.h index 57fd5fef..db61db3b 100644 --- a/freebsd/sys/netinet/sctp_peeloff.h +++ b/freebsd/sys/netinet/sctp_peeloff.h @@ -30,7 +30,7 @@ /* $KAME: sctp_peeloff.h,v 1.6 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_peeloff_h__ diff --git a/freebsd/sys/netinet/sctp_structs.h b/freebsd/sys/netinet/sctp_structs.h index 2050c581..94d0395c 100644 --- a/freebsd/sys/netinet/sctp_structs.h +++ b/freebsd/sys/netinet/sctp_structs.h @@ -30,15 +30,15 @@ /* $KAME: sctp_structs.h,v 1.13 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_structs_h__ #define __sctp_structs_h__ -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_auth.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_auth.h> struct sctp_timer { sctp_os_timer_t timer; diff --git a/freebsd/sys/netinet/sctp_sysctl.c b/freebsd/sys/netinet/sctp_sysctl.c index b5700e4e..6fcf4964 100644 --- a/freebsd/sys/netinet/sctp_sysctl.c +++ b/freebsd/sys/netinet/sctp_sysctl.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. @@ -30,17 +30,17 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_constants.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/sys/smp.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp.h> +#include <netinet/sctp_constants.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <sys/smp.h> /* * sysctl tunable variables diff --git a/freebsd/sys/netinet/sctp_sysctl.h b/freebsd/sys/netinet/sctp_sysctl.h index 5f7f270d..9dbc9ed2 100644 --- a/freebsd/sys/netinet/sctp_sysctl.h +++ b/freebsd/sys/netinet/sctp_sysctl.h @@ -28,14 +28,14 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_sysctl_h__ #define __sctp_sysctl_h__ -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_constants.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_constants.h> struct sctp_sysctl { uint32_t sctp_sendspace; diff --git a/freebsd/sys/netinet/sctp_timer.c b/freebsd/sys/netinet/sctp_timer.c index 090689b1..4fbded33 100644 --- a/freebsd/sys/netinet/sctp_timer.c +++ b/freebsd/sys/netinet/sctp_timer.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. @@ -32,26 +32,26 @@ /* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #define _IP_VHL -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_pcb.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_pcb.h> #ifdef INET6 #endif -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_input.h> -#include <freebsd/netinet/sctp.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/udp.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_input.h> +#include <netinet/sctp.h> +#include <netinet/sctp_uio.h> +#include <netinet/udp.h> void diff --git a/freebsd/sys/netinet/sctp_timer.h b/freebsd/sys/netinet/sctp_timer.h index 34abbace..a26ad728 100644 --- a/freebsd/sys/netinet/sctp_timer.h +++ b/freebsd/sys/netinet/sctp_timer.h @@ -29,7 +29,7 @@ */ /* $KAME: sctp_timer.h,v 1.6 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_timer_h__ diff --git a/freebsd/sys/netinet/sctp_uio.h b/freebsd/sys/netinet/sctp_uio.h index 734447ed..4d72b1ca 100644 --- a/freebsd/sys/netinet/sctp_uio.h +++ b/freebsd/sys/netinet/sctp_uio.h @@ -29,7 +29,7 @@ */ /* $KAME: sctp_uio.h,v 1.11 2005/03/06 16:04:18 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctp_uio_h__ @@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$"); #if ! defined(_KERNEL) -#include <freebsd/stdint.h> +#include <stdint.h> #endif -#include <freebsd/sys/types.h> -#include <freebsd/sys/socket.h> -#include <freebsd/netinet/in.h> +#include <rtems/bsd/sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> typedef uint32_t sctp_assoc_t; @@ -999,12 +999,12 @@ union sctp_sockstore { /***********************************/ #ifndef ntohll -#include <freebsd/sys/endian.h> +#include <sys/endian.h> #define ntohll(x) be64toh(x) #endif #ifndef htonll -#include <freebsd/sys/endian.h> +#include <sys/endian.h> #define htonll(x) htobe64(x) #endif /***********************************/ diff --git a/freebsd/sys/netinet/sctp_usrreq.c b/freebsd/sys/netinet/sctp_usrreq.c index bb60795c..e901cf97 100644 --- a/freebsd/sys/netinet/sctp_usrreq.c +++ b/freebsd/sys/netinet/sctp_usrreq.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. @@ -32,26 +32,26 @@ /* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/sys/proc.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_var.h> +#include <netinet/sctp_os.h> +#include <sys/proc.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_var.h> #if defined(INET6) #endif -#include <freebsd/netinet/sctp_sysctl.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_indata.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_auth.h> -#include <freebsd/netinet/sctp_bsd_addr.h> -#include <freebsd/netinet/sctp_cc_functions.h> -#include <freebsd/netinet/udp.h> +#include <netinet/sctp_sysctl.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_indata.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_auth.h> +#include <netinet/sctp_bsd_addr.h> +#include <netinet/sctp_cc_functions.h> +#include <netinet/udp.h> diff --git a/freebsd/sys/netinet/sctp_var.h b/freebsd/sys/netinet/sctp_var.h index 93b92038..bff7f5de 100644 --- a/freebsd/sys/netinet/sctp_var.h +++ b/freebsd/sys/netinet/sctp_var.h @@ -30,13 +30,13 @@ /* $KAME: sctp_var.h,v 1.24 2005/03/06 16:04:19 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#ifndef _NETINET_SCTP_VAR_HH_ -#define _NETINET_SCTP_VAR_HH_ +#ifndef _NETINET_SCTP_VAR_H_ +#define _NETINET_SCTP_VAR_H_ -#include <freebsd/netinet/sctp_uio.h> +#include <netinet/sctp_uio.h> #if defined(_KERNEL) || defined(__Userspace__) @@ -333,4 +333,4 @@ __P((struct sctp_inpcb *, struct ip *ip, struct sctphdr *, #endif /* _KERNEL */ -#endif /* !_NETINET_SCTP_VAR_HH_ */ +#endif /* !_NETINET_SCTP_VAR_H_ */ diff --git a/freebsd/sys/netinet/sctputil.c b/freebsd/sys/netinet/sctputil.c index 7e8ac1ea..e9a279c9 100644 --- a/freebsd/sys/netinet/sctputil.c +++ b/freebsd/sys/netinet/sctputil.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. @@ -32,25 +32,25 @@ /* $KAME: sctputil.c,v 1.37 2005/03/07 23:26:09 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/netinet/sctp_os.h> -#include <freebsd/netinet/sctp_pcb.h> -#include <freebsd/netinet/sctputil.h> -#include <freebsd/netinet/sctp_var.h> -#include <freebsd/netinet/sctp_sysctl.h> +#include <netinet/sctp_os.h> +#include <netinet/sctp_pcb.h> +#include <netinet/sctputil.h> +#include <netinet/sctp_var.h> +#include <netinet/sctp_sysctl.h> #ifdef INET6 #endif -#include <freebsd/netinet/sctp_header.h> -#include <freebsd/netinet/sctp_output.h> -#include <freebsd/netinet/sctp_uio.h> -#include <freebsd/netinet/sctp_timer.h> -#include <freebsd/netinet/sctp_indata.h>/* for sctp_deliver_data() */ -#include <freebsd/netinet/sctp_auth.h> -#include <freebsd/netinet/sctp_asconf.h> -#include <freebsd/netinet/sctp_cc_functions.h> -#include <freebsd/netinet/sctp_bsd_addr.h> +#include <netinet/sctp_header.h> +#include <netinet/sctp_output.h> +#include <netinet/sctp_uio.h> +#include <netinet/sctp_timer.h> +#include <netinet/sctp_indata.h>/* for sctp_deliver_data() */ +#include <netinet/sctp_auth.h> +#include <netinet/sctp_asconf.h> +#include <netinet/sctp_cc_functions.h> +#include <netinet/sctp_bsd_addr.h> #ifndef KTR_SCTP @@ -6813,11 +6813,11 @@ sctp_log_trace(uint32_t subsys, const char *str SCTP_UNUSED, uint32_t a, uint32_ * so we can do UDP tunneling. In * the mean-time, we return error */ -#include <freebsd/netinet/udp.h> -#include <freebsd/netinet/udp_var.h> -#include <freebsd/sys/proc.h> +#include <netinet/udp.h> +#include <netinet/udp_var.h> +#include <sys/proc.h> #ifdef INET6 -#include <freebsd/netinet6/sctp6_var.h> +#include <netinet6/sctp6_var.h> #endif static void diff --git a/freebsd/sys/netinet/sctputil.h b/freebsd/sys/netinet/sctputil.h index b1bee3a4..d109ec23 100644 --- a/freebsd/sys/netinet/sctputil.h +++ b/freebsd/sys/netinet/sctputil.h @@ -31,7 +31,7 @@ /* $KAME: sctputil.h,v 1.15 2005/03/06 16:04:19 itojun Exp $ */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #ifndef __sctputil_h__ #define __sctputil_h__ diff --git a/freebsd/sys/netinet/tcp.h b/freebsd/sys/netinet/tcp.h index 19b1c57f..8779582a 100644 --- a/freebsd/sys/netinet/tcp.h +++ b/freebsd/sys/netinet/tcp.h @@ -1,2 +1,226 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/tcp.h> +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)tcp.h 8.1 (Berkeley) 6/10/93 + * $FreeBSD$ + */ + +#ifndef _NETINET_TCP_H_ +#define _NETINET_TCP_H_ + +#include <sys/cdefs.h> + +#if __BSD_VISIBLE + +typedef u_int32_t tcp_seq; + +#define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */ +#define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */ + +/* + * TCP header. + * Per RFC 793, September, 1981. + */ +struct tcphdr { + u_short th_sport; /* source port */ + u_short th_dport; /* destination port */ + tcp_seq th_seq; /* sequence number */ + tcp_seq th_ack; /* acknowledgement number */ +#if BYTE_ORDER == LITTLE_ENDIAN + u_int th_x2:4, /* (unused) */ + th_off:4; /* data offset */ +#endif +#if BYTE_ORDER == BIG_ENDIAN + u_int th_off:4, /* data offset */ + th_x2:4; /* (unused) */ +#endif + u_char th_flags; +#define TH_FIN 0x01 +#define TH_SYN 0x02 +#define TH_RST 0x04 +#define TH_PUSH 0x08 +#define TH_ACK 0x10 +#define TH_URG 0x20 +#define TH_ECE 0x40 +#define TH_CWR 0x80 +#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|TH_ECE|TH_CWR) +#define PRINT_TH_FLAGS "\20\1FIN\2SYN\3RST\4PUSH\5ACK\6URG\7ECE\10CWR" + + u_short th_win; /* window */ + u_short th_sum; /* checksum */ + u_short th_urp; /* urgent pointer */ +}; + +#define TCPOPT_EOL 0 +#define TCPOLEN_EOL 1 +#define TCPOPT_PAD 0 /* padding after EOL */ +#define TCPOLEN_PAD 1 +#define TCPOPT_NOP 1 +#define TCPOLEN_NOP 1 +#define TCPOPT_MAXSEG 2 +#define TCPOLEN_MAXSEG 4 +#define TCPOPT_WINDOW 3 +#define TCPOLEN_WINDOW 3 +#define TCPOPT_SACK_PERMITTED 4 +#define TCPOLEN_SACK_PERMITTED 2 +#define TCPOPT_SACK 5 +#define TCPOLEN_SACKHDR 2 +#define TCPOLEN_SACK 8 /* 2*sizeof(tcp_seq) */ +#define TCPOPT_TIMESTAMP 8 +#define TCPOLEN_TIMESTAMP 10 +#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ +#define TCPOPT_SIGNATURE 19 /* Keyed MD5: RFC 2385 */ +#define TCPOLEN_SIGNATURE 18 + +/* Miscellaneous constants */ +#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */ +#define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */ + + +/* + * Default maximum segment size for TCP. + * With an IP MTU of 576, this is 536, + * but 512 is probably more convenient. + * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). + */ +#define TCP_MSS 512 +/* + * TCP_MINMSS is defined to be 216 which is fine for the smallest + * link MTU (256 bytes, AX.25 packet radio) in the Internet. + * However it is very unlikely to come across such low MTU interfaces + * these days (anno dato 2003). + * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. + * Setting this to "0" disables the minmss check. + */ +#define TCP_MINMSS 216 + +/* + * Default maximum segment size for TCP6. + * With an IP6 MSS of 1280, this is 1220, + * but 1024 is probably more convenient. (xxx kazu in doubt) + * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr)) + */ +#define TCP6_MSS 1024 + +#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */ +#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */ + +#define TCP_MAX_WINSHIFT 14 /* maximum window shift */ + +#define TCP_MAXBURST 4 /* maximum segments in a burst */ + +#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */ +#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) + /* max space left for options */ +#endif /* __BSD_VISIBLE */ + +/* + * User-settable options (used with setsockopt). + */ +#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ +#if __BSD_VISIBLE +#define TCP_MAXSEG 0x02 /* set maximum segment size */ +#define TCP_NOPUSH 0x04 /* don't push last block of write */ +#define TCP_NOOPT 0x08 /* don't use TCP options */ +#define TCP_MD5SIG 0x10 /* use MD5 digests (RFC2385) */ +#define TCP_INFO 0x20 /* retrieve tcp_info structure */ +#define TCP_CONGESTION 0x40 /* get/set congestion control algorithm */ + +#define TCP_CA_NAME_MAX 16 /* max congestion control name length */ + +#define TCPI_OPT_TIMESTAMPS 0x01 +#define TCPI_OPT_SACK 0x02 +#define TCPI_OPT_WSCALE 0x04 +#define TCPI_OPT_ECN 0x08 +#define TCPI_OPT_TOE 0x10 + +/* + * The TCP_INFO socket option comes from the Linux 2.6 TCP API, and permits + * the caller to query certain information about the state of a TCP + * connection. We provide an overlapping set of fields with the Linux + * implementation, but since this is a fixed size structure, room has been + * left for growth. In order to maximize potential future compatibility with + * the Linux API, the same variable names and order have been adopted, and + * padding left to make room for omitted fields in case they are added later. + * + * XXX: This is currently an unstable ABI/API, in that it is expected to + * change. + */ +struct tcp_info { + u_int8_t tcpi_state; /* TCP FSM state. */ + u_int8_t __tcpi_ca_state; + u_int8_t __tcpi_retransmits; + u_int8_t __tcpi_probes; + u_int8_t __tcpi_backoff; + u_int8_t tcpi_options; /* Options enabled on conn. */ + u_int8_t tcpi_snd_wscale:4, /* RFC1323 send shift value. */ + tcpi_rcv_wscale:4; /* RFC1323 recv shift value. */ + + u_int32_t tcpi_rto; /* Retransmission timeout (usec). */ + u_int32_t __tcpi_ato; + u_int32_t tcpi_snd_mss; /* Max segment size for send. */ + u_int32_t tcpi_rcv_mss; /* Max segment size for receive. */ + + u_int32_t __tcpi_unacked; + u_int32_t __tcpi_sacked; + u_int32_t __tcpi_lost; + u_int32_t __tcpi_retrans; + u_int32_t __tcpi_fackets; + + /* Times; measurements in usecs. */ + u_int32_t __tcpi_last_data_sent; + u_int32_t __tcpi_last_ack_sent; /* Also unimpl. on Linux? */ + u_int32_t tcpi_last_data_recv; /* Time since last recv data. */ + u_int32_t __tcpi_last_ack_recv; + + /* Metrics; variable units. */ + u_int32_t __tcpi_pmtu; + u_int32_t __tcpi_rcv_ssthresh; + u_int32_t tcpi_rtt; /* Smoothed RTT in usecs. */ + u_int32_t tcpi_rttvar; /* RTT variance in usecs. */ + u_int32_t tcpi_snd_ssthresh; /* Slow start threshold. */ + u_int32_t tcpi_snd_cwnd; /* Send congestion window. */ + u_int32_t __tcpi_advmss; + u_int32_t __tcpi_reordering; + + u_int32_t __tcpi_rcv_rtt; + u_int32_t tcpi_rcv_space; /* Advertised recv window. */ + + /* FreeBSD extensions to tcp_info. */ + u_int32_t tcpi_snd_wnd; /* Advertised send window. */ + u_int32_t tcpi_snd_bwnd; /* Bandwidth send window. */ + u_int32_t tcpi_snd_nxt; /* Next egress seqno */ + u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ + u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ + + /* Padding to grow without breaking ABI. */ + u_int32_t __tcpi_pad[29]; /* Padding. */ +}; +#endif + +#endif /* !_NETINET_TCP_H_ */ diff --git a/freebsd/sys/netinet/tcp_debug.c b/freebsd/sys/netinet/tcp_debug.c index 52a82193..5d4b992a 100644 --- a/freebsd/sys/netinet/tcp_debug.c +++ b/freebsd/sys/netinet/tcp_debug.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1993 @@ -32,12 +32,12 @@ * @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_tcpdebug.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_tcpdebug.h> #ifdef TCPDEBUG /* load symbolic names */ @@ -47,28 +47,28 @@ __FBSDID("$FreeBSD$"); #define TANAMES #endif -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mbuf.h> +#include <sys/mutex.h> +#include <sys/protosw.h> +#include <sys/socket.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcpip.h> -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/ip_var.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/tcpip.h> +#include <netinet/tcp_debug.h> #ifdef TCPDEBUG static int tcpconsdebug = 0; diff --git a/freebsd/sys/netinet/tcp_debug.h b/freebsd/sys/netinet/tcp_debug.h index 0c103958..c4d38da9 100644 --- a/freebsd/sys/netinet/tcp_debug.h +++ b/freebsd/sys/netinet/tcp_debug.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_DEBUG_HH_ -#define _NETINET_TCP_DEBUG_HH_ +#ifndef _NETINET_TCP_DEBUG_H_ +#define _NETINET_TCP_DEBUG_H_ struct tcp_debug { uint32_t td_time; /* network format */ @@ -77,4 +77,4 @@ struct tcp_debug tcp_debug[TCP_NDEBUG]; int tcp_debx; #endif -#endif /* !_NETINET_TCP_DEBUG_HH_ */ +#endif /* !_NETINET_TCP_DEBUG_H_ */ diff --git a/freebsd/sys/netinet/tcp_fsm.h b/freebsd/sys/netinet/tcp_fsm.h index 253e53d4..61fd0c1f 100644 --- a/freebsd/sys/netinet/tcp_fsm.h +++ b/freebsd/sys/netinet/tcp_fsm.h @@ -31,8 +31,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_FSM_HH_ -#define _NETINET_TCP_FSM_HH_ +#ifndef _NETINET_TCP_FSM_H_ +#define _NETINET_TCP_FSM_H_ /* * TCP FSM state definitions. diff --git a/freebsd/sys/netinet/tcp_hostcache.c b/freebsd/sys/netinet/tcp_hostcache.c index 07b78cfe..352df1dd 100644 --- a/freebsd/sys/netinet/tcp_hostcache.c +++ b/freebsd/sys/netinet/tcp_hostcache.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2002 Andre Oppermann, Internet Business Solutions AG @@ -64,43 +64,43 @@ * followed here. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet6.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> +#include <rtems/bsd/local/opt_inet6.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/malloc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/in_var.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/ip6_var.h> +#include <netinet/ip6.h> +#include <netinet6/ip6_var.h> #endif -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcp_hostcache.h> +#include <netinet/tcp.h> +#include <netinet/tcp_var.h> +#include <netinet/tcp_hostcache.h> #ifdef INET6 -#include <freebsd/netinet6/tcp6_var.h> +#include <netinet6/tcp6_var.h> #endif -#include <freebsd/vm/uma.h> +#include <vm/uma.h> /* Arbitrary values */ #define TCP_HOSTCACHE_HASHSIZE 512 diff --git a/freebsd/sys/netinet/tcp_hostcache.h b/freebsd/sys/netinet/tcp_hostcache.h index a494ed03..8569edcc 100644 --- a/freebsd/sys/netinet/tcp_hostcache.h +++ b/freebsd/sys/netinet/tcp_hostcache.h @@ -34,8 +34,8 @@ * followed here. */ -#ifndef _NETINET_TCP_HOSTCACHE_HH_ -#define _NETINET_TCP_HOSTCACHE_HH_ +#ifndef _NETINET_TCP_HOSTCACHE_H_ +#define _NETINET_TCP_HOSTCACHE_H_ TAILQ_HEAD(hc_qhead, hc_metrics); @@ -79,4 +79,4 @@ struct tcp_hostcache { int purgeall; }; -#endif /* !_NETINET_TCP_HOSTCACHE_HH_*/ +#endif /* !_NETINET_TCP_HOSTCACHE_H_*/ diff --git a/freebsd/sys/netinet/tcp_input.c b/freebsd/sys/netinet/tcp_input.c index 85daf203..8feb571f 100644 --- a/freebsd/sys/netinet/tcp_input.c +++ b/freebsd/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 @@ -31,72 +31,72 @@ * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipfw.h> /* for ipfw_fwd */ -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/proc.h> /* for proc0 declaration */ -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */ - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> +#include <rtems/bsd/local/opt_ipfw.h> /* for ipfw_fwd */ +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/proc.h> /* for proc0 declaration */ +#include <sys/protosw.h> +#include <sys/signalvar.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <sys/systm.h> + +#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */ + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> #define TCPSTATES /* for logging */ -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_icmp.h> /* required for icmp_var.h */ -#include <freebsd/netinet/icmp_var.h> /* for ICMP_BANDLIM */ -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet/icmp6.h> -#include <freebsd/netinet6/in6_pcb.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/nd6.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet6/tcp6_var.h> -#include <freebsd/netinet/tcpip.h> -#include <freebsd/netinet/tcp_syncache.h> +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_icmp.h> /* required for icmp_var.h */ +#include <netinet/icmp_var.h> /* for ICMP_BANDLIM */ +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/ip6.h> +#include <netinet/icmp6.h> +#include <netinet6/in6_pcb.h> +#include <netinet6/ip6_var.h> +#include <netinet6/nd6.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet6/tcp6_var.h> +#include <netinet/tcpip.h> +#include <netinet/tcp_syncache.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif /* TCPDEBUG */ #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/ipsec6.h> +#include <netipsec/ipsec.h> +#include <netipsec/ipsec6.h> #endif /*IPSEC*/ -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> static const int tcprexmtthresh = 3; diff --git a/freebsd/sys/netinet/tcp_lro.c b/freebsd/sys/netinet/tcp_lro.c index 6aaff4a5..bbb98e60 100644 --- a/freebsd/sys/netinet/tcp_lro.c +++ b/freebsd/sys/netinet/tcp_lro.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /****************************************************************************** @@ -35,25 +35,25 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/endian.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/socket.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/ethernet.h> -#include <freebsd/net/if_media.h> - -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_lro.h> - -#include <freebsd/machine/bus.h> -#include <freebsd/machine/in_cksum.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/endian.h> +#include <sys/mbuf.h> +#include <sys/kernel.h> +#include <sys/socket.h> + +#include <net/if.h> +#include <net/ethernet.h> +#include <net/if_media.h> + +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <netinet/tcp.h> +#include <netinet/tcp_lro.h> + +#include <machine/bus.h> +#include <machine/in_cksum.h> static uint16_t do_csum_data(uint16_t *raw, int len) diff --git a/freebsd/sys/netinet/tcp_lro.h b/freebsd/sys/netinet/tcp_lro.h index 20cfb7cf..08aac690 100644 --- a/freebsd/sys/netinet/tcp_lro.h +++ b/freebsd/sys/netinet/tcp_lro.h @@ -34,8 +34,8 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -#ifndef _TCP_LRO_HH_ -#define _TCP_LRO_HH_ +#ifndef _TCP_LRO_H_ +#define _TCP_LRO_H_ struct lro_entry; struct lro_entry @@ -82,4 +82,4 @@ int tcp_lro_rx(struct lro_ctrl *, struct mbuf *, uint32_t); /* Number of LRO entries - these are per rx queue */ #define LRO_ENTRIES 8 -#endif /* _TCP_LRO_HH_ */ +#endif /* _TCP_LRO_H_ */ diff --git a/freebsd/sys/netinet/tcp_offload.c b/freebsd/sys/netinet/tcp_offload.c index 9c73992b..3c663a47 100644 --- a/freebsd/sys/netinet/tcp_offload.c +++ b/freebsd/sys/netinet/tcp_offload.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2007, Chelsio Inc. @@ -27,32 +27,32 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/if_types.h> -#include <freebsd/net/if_var.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcp_offload.h> -#include <freebsd/netinet/toedev.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/types.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/socketvar.h> + +#include <net/if.h> +#include <net/if_types.h> +#include <net/if_var.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_pcb.h> +#include <netinet/tcp.h> +#include <netinet/tcp_var.h> +#include <netinet/tcp_offload.h> +#include <netinet/toedev.h> uint32_t toedev_registration_count; diff --git a/freebsd/sys/netinet/tcp_offload.h b/freebsd/sys/netinet/tcp_offload.h index f2a35a58..48f35ff6 100644 --- a/freebsd/sys/netinet/tcp_offload.h +++ b/freebsd/sys/netinet/tcp_offload.h @@ -27,8 +27,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_OFFLOAD_HH_ -#define _NETINET_TCP_OFFLOAD_HH_ +#ifndef _NETINET_TCP_OFFLOAD_H_ +#define _NETINET_TCP_OFFLOAD_H_ #ifndef _KERNEL #error "no user-serviceable parts inside" @@ -247,7 +247,7 @@ int tcp_offload_connect(struct socket *so, struct sockaddr *nam); * hackish way of allowing this file to also be included by TOE * which needs to be kept ignorant of socket implementation details */ -#ifdef _SYS_SOCKETVAR_HH_ +#ifdef _SYS_SOCKETVAR_H_ /* * The socket has not been marked as "do not offload" */ @@ -344,11 +344,11 @@ tcp_offload_listen_close(struct tcpcb *tp) #endif } #undef SO_OFFLOADABLE -#endif /* _SYS_SOCKETVAR_HH_ */ +#endif /* _SYS_SOCKETVAR_H_ */ #undef tp_offload void tcp_offload_twstart(struct tcpcb *tp); struct tcpcb *tcp_offload_close(struct tcpcb *tp); struct tcpcb *tcp_offload_drop(struct tcpcb *tp, int error); -#endif /* _NETINET_TCP_OFFLOAD_HH_ */ +#endif /* _NETINET_TCP_OFFLOAD_H_ */ diff --git a/freebsd/sys/netinet/tcp_output.c b/freebsd/sys/netinet/tcp_output.c index bebab1f1..55a1f6e4 100644 --- a/freebsd/sys/netinet/tcp_output.c +++ b/freebsd/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 @@ -31,59 +31,59 @@ * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/domain.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mbuf.h> +#include <sys/mutex.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> #ifdef INET6 -#include <freebsd/netinet6/in6_pcb.h> -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/ip6_var.h> +#include <netinet6/in6_pcb.h> +#include <netinet/ip6.h> +#include <netinet6/ip6_var.h> #endif -#include <freebsd/netinet/tcp.h> +#include <netinet/tcp.h> #define TCPOUTFLAGS -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcpip.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> +#include <netipsec/ipsec.h> #endif /*IPSEC*/ -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> #ifdef notyet extern struct mbuf *m_copypack(); diff --git a/freebsd/sys/netinet/tcp_reass.c b/freebsd/sys/netinet/tcp_reass.c index aea58740..64aeca84 100644 --- a/freebsd/sys/netinet/tcp_reass.c +++ b/freebsd/sys/netinet/tcp_reass.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 @@ -31,49 +31,49 @@ * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet6/in6_pcb.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/nd6.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet6/tcp6_var.h> -#include <freebsd/netinet/tcpip.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <sys/systm.h> + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> +#include <netinet/ip6.h> +#include <netinet6/in6_pcb.h> +#include <netinet6/ip6_var.h> +#include <netinet6/nd6.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet6/tcp6_var.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif /* TCPDEBUG */ static int tcp_reass_sysctl_maxseg(SYSCTL_HANDLER_ARGS); diff --git a/freebsd/sys/netinet/tcp_sack.c b/freebsd/sys/netinet/tcp_sack.c index 94bae57b..7a7df0bb 100644 --- a/freebsd/sys/netinet/tcp_sack.c +++ b/freebsd/sys/netinet/tcp_sack.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 @@ -72,57 +72,57 @@ * Research Laboratory (NRL). */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/proc.h> /* for proc0 declaration */ -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */ - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet/icmp6.h> -#include <freebsd/netinet6/nd6.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/in6_pcb.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet6/tcp6_var.h> -#include <freebsd/netinet/tcpip.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/proc.h> /* for proc0 declaration */ +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/syslog.h> +#include <sys/systm.h> + +#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */ + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/in_var.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/ip6.h> +#include <netinet/icmp6.h> +#include <netinet6/nd6.h> +#include <netinet6/ip6_var.h> +#include <netinet6/in6_pcb.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet6/tcp6_var.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif /* TCPDEBUG */ -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> VNET_DECLARE(struct uma_zone *, sack_hole_zone); #define V_sack_hole_zone VNET(sack_hole_zone) diff --git a/freebsd/sys/netinet/tcp_seq.h b/freebsd/sys/netinet/tcp_seq.h index 8af7b0ab..f58b537c 100644 --- a/freebsd/sys/netinet/tcp_seq.h +++ b/freebsd/sys/netinet/tcp_seq.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_SEQ_HH_ -#define _NETINET_TCP_SEQ_HH_ +#ifndef _NETINET_TCP_SEQ_H_ +#define _NETINET_TCP_SEQ_H_ /* * TCP sequence numbers are 32 bit integers operated * on with modular arithmetic. These macros can be @@ -65,4 +65,4 @@ #define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * hz) /* timestamp wrap-around time */ -#endif /* _NETINET_TCP_SEQ_HH_ */ +#endif /* _NETINET_TCP_SEQ_H_ */ diff --git a/freebsd/sys/netinet/tcp_subr.c b/freebsd/sys/netinet/tcp_subr.c index 83777450..55e5806f 100644 --- a/freebsd/sys/netinet/tcp_subr.c +++ b/freebsd/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 @@ -31,87 +31,87 @@ * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_compat.h> -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/callout.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> +#include <rtems/bsd/local/opt_compat.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/callout.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/jail.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> #ifdef INET6 -#include <freebsd/sys/domain.h> +#include <sys/domain.h> #endif -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/random.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/route.h> -#include <freebsd/net/if.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/protosw.h> +#include <sys/random.h> + +#include <vm/uma.h> + +#include <net/route.h> +#include <net/if.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif -#include <freebsd/netinet/in_pcb.h> +#include <netinet/in_pcb.h> #ifdef INET6 -#include <freebsd/netinet6/in6_pcb.h> +#include <netinet6/in6_pcb.h> #endif -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> #ifdef INET6 -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/scope6_var.h> -#include <freebsd/netinet6/nd6.h> +#include <netinet6/ip6_var.h> +#include <netinet6/scope6_var.h> +#include <netinet6/nd6.h> #endif -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcp_syncache.h> -#include <freebsd/netinet/tcp_offload.h> +#include <netinet/ip_icmp.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/tcp_syncache.h> +#include <netinet/tcp_offload.h> #ifdef INET6 -#include <freebsd/netinet6/tcp6_var.h> +#include <netinet6/tcp6_var.h> #endif -#include <freebsd/netinet/tcpip.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif -#include <freebsd/netinet6/ip6protosw.h> +#include <netinet6/ip6protosw.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/xform.h> +#include <netipsec/ipsec.h> +#include <netipsec/xform.h> #ifdef INET6 -#include <freebsd/netipsec/ipsec6.h> +#include <netipsec/ipsec6.h> #endif -#include <freebsd/netipsec/key.h> -#include <freebsd/sys/syslog.h> +#include <netipsec/key.h> +#include <sys/syslog.h> #endif /*IPSEC*/ -#include <freebsd/machine/in_cksum.h> -#include <freebsd/sys/md5.h> +#include <machine/in_cksum.h> +#include <sys/md5.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> VNET_DEFINE(int, tcp_mssdflt) = TCP_MSS; #ifdef INET6 diff --git a/freebsd/sys/netinet/tcp_syncache.c b/freebsd/sys/netinet/tcp_syncache.c index 78790cc8..04f321ab 100644 --- a/freebsd/sys/netinet/tcp_syncache.c +++ b/freebsd/sys/netinet/tcp_syncache.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 2001 McAfee, Inc. @@ -32,72 +32,72 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/limits.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/md5.h> -#include <freebsd/sys/proc.h> /* for proc0 declaration */ -#include <freebsd/sys/random.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/ucred.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/limits.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/md5.h> +#include <sys/proc.h> /* for proc0 declaration */ +#include <sys/random.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/syslog.h> +#include <sys/ucred.h> + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/in_var.h> +#include <netinet/in_pcb.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> -#include <freebsd/netinet/icmp6.h> -#include <freebsd/netinet6/nd6.h> -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/in6_pcb.h> +#include <netinet/ip6.h> +#include <netinet/icmp6.h> +#include <netinet6/nd6.h> +#include <netinet6/ip6_var.h> +#include <netinet6/in6_pcb.h> #endif -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcp_syncache.h> -#include <freebsd/netinet/tcp_offload.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/tcp_syncache.h> +#include <netinet/tcp_offload.h> #ifdef INET6 -#include <freebsd/netinet6/tcp6_var.h> +#include <netinet6/tcp6_var.h> #endif #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> +#include <netipsec/ipsec.h> #ifdef INET6 -#include <freebsd/netipsec/ipsec6.h> +#include <netipsec/ipsec6.h> #endif -#include <freebsd/netipsec/key.h> +#include <netipsec/key.h> #endif /*IPSEC*/ -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> static VNET_DEFINE(int, tcp_syncookies) = 1; #define V_tcp_syncookies VNET(tcp_syncookies) diff --git a/freebsd/sys/netinet/tcp_syncache.h b/freebsd/sys/netinet/tcp_syncache.h index 96ba1535..93c7aaa2 100644 --- a/freebsd/sys/netinet/tcp_syncache.h +++ b/freebsd/sys/netinet/tcp_syncache.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_SYNCACHE_HH_ -#define _NETINET_TCP_SYNCACHE_HH_ +#ifndef _NETINET_TCP_SYNCACHE_H_ +#define _NETINET_TCP_SYNCACHE_H_ #ifdef _KERNEL struct toeopt; @@ -124,4 +124,4 @@ struct tcp_syncache { }; #endif /* _KERNEL */ -#endif /* !_NETINET_TCP_SYNCACHE_HH_ */ +#endif /* !_NETINET_TCP_SYNCACHE_H_ */ diff --git a/freebsd/sys/netinet/tcp_timer.c b/freebsd/sys/netinet/tcp_timer.c index 36e2bec2..cbf9206f 100644 --- a/freebsd/sys/netinet/tcp_timer.c +++ b/freebsd/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 @@ -31,41 +31,41 @@ * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_systm.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mbuf.h> +#include <sys/mutex.h> +#include <sys/protosw.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sysctl.h> +#include <sys/systm.h> + +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_systm.h> #ifdef INET6 -#include <freebsd/netinet6/in6_pcb.h> +#include <netinet6/in6_pcb.h> #endif -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcpip.h> +#include <netinet/ip_var.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif int tcp_keepinit; diff --git a/freebsd/sys/netinet/tcp_timer.h b/freebsd/sys/netinet/tcp_timer.h index 1514a293..ff455b6b 100644 --- a/freebsd/sys/netinet/tcp_timer.h +++ b/freebsd/sys/netinet/tcp_timer.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_TIMER_HH_ -#define _NETINET_TCP_TIMER_HH_ +#ifndef _NETINET_TCP_TIMER_H_ +#define _NETINET_TCP_TIMER_H_ /* * The TCPT_REXMT timer is used to force retransmissions. @@ -180,4 +180,4 @@ void tcp_timer_delack(void *xtp); #endif /* _KERNEL */ -#endif /* !_NETINET_TCP_TIMER_HH_ */ +#endif /* !_NETINET_TCP_TIMER_H_ */ diff --git a/freebsd/sys/netinet/tcp_timewait.c b/freebsd/sys/netinet/tcp_timewait.c index 92643d0a..de321e3f 100644 --- a/freebsd/sys/netinet/tcp_timewait.c +++ b/freebsd/sys/netinet/tcp_timewait.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 @@ -31,68 +31,68 @@ * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/callout.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/random.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/route.h> -#include <freebsd/net/if.h> -#include <freebsd/net/vnet.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/ip.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/callout.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/protosw.h> +#include <sys/random.h> + +#include <vm/uma.h> + +#include <net/route.h> +#include <net/if.h> +#include <net/vnet.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif -#include <freebsd/netinet/in_pcb.h> +#include <netinet/in_pcb.h> #ifdef INET6 -#include <freebsd/netinet6/in6_pcb.h> +#include <netinet6/in6_pcb.h> #endif -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> #ifdef INET6 -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/scope6_var.h> -#include <freebsd/netinet6/nd6.h> +#include <netinet6/ip6_var.h> +#include <netinet6/scope6_var.h> +#include <netinet6/nd6.h> #endif -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> +#include <netinet/ip_icmp.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> #ifdef INET6 -#include <freebsd/netinet6/tcp6_var.h> +#include <netinet6/tcp6_var.h> #endif -#include <freebsd/netinet/tcpip.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif -#include <freebsd/netinet6/ip6protosw.h> +#include <netinet6/ip6protosw.h> -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> static VNET_DEFINE(uma_zone_t, tcptw_zone); #define V_tcptw_zone VNET(tcptw_zone) diff --git a/freebsd/sys/netinet/tcp_usrreq.c b/freebsd/sys/netinet/tcp_usrreq.c index fc083e05..3d803987 100644 --- a/freebsd/sys/netinet/tcp_usrreq.c +++ b/freebsd/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1993 @@ -33,62 +33,62 @@ * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ddb.h> -#include <freebsd/local/opt_inet.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_tcpdebug.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/mbuf.h> +#include <rtems/bsd/local/opt_ddb.h> +#include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_tcpdebug.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> +#include <sys/mbuf.h> #ifdef INET6 -#include <freebsd/sys/domain.h> +#include <sys/domain.h> #endif /* INET6 */ -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/jail.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/protosw.h> +#include <sys/proc.h> +#include <sys/jail.h> #ifdef DDB -#include <freebsd/ddb/ddb.h> +#include <ddb/ddb.h> #endif -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> -#include <freebsd/net/vnet.h> +#include <net/if.h> +#include <net/route.h> +#include <net/vnet.h> -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/in_systm.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif -#include <freebsd/netinet/in_pcb.h> +#include <netinet/in_pcb.h> #ifdef INET6 -#include <freebsd/netinet6/in6_pcb.h> +#include <netinet6/in6_pcb.h> #endif -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip_var.h> +#include <netinet/in_var.h> +#include <netinet/ip_var.h> #ifdef INET6 -#include <freebsd/netinet6/ip6_var.h> -#include <freebsd/netinet6/scope6_var.h> +#include <netinet6/ip6_var.h> +#include <netinet6/scope6_var.h> #endif -#include <freebsd/netinet/tcp.h> -#include <freebsd/netinet/tcp_fsm.h> -#include <freebsd/netinet/tcp_seq.h> -#include <freebsd/netinet/tcp_timer.h> -#include <freebsd/netinet/tcp_var.h> -#include <freebsd/netinet/tcpip.h> +#include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> +#include <netinet/tcp_seq.h> +#include <netinet/tcp_timer.h> +#include <netinet/tcp_var.h> +#include <netinet/tcpip.h> #ifdef TCPDEBUG -#include <freebsd/netinet/tcp_debug.h> +#include <netinet/tcp_debug.h> #endif -#include <freebsd/netinet/tcp_offload.h> +#include <netinet/tcp_offload.h> /* * TCP protocol interface to socket abstraction. diff --git a/freebsd/sys/netinet/tcp_var.h b/freebsd/sys/netinet/tcp_var.h index 77586144..9de0ca89 100644 --- a/freebsd/sys/netinet/tcp_var.h +++ b/freebsd/sys/netinet/tcp_var.h @@ -30,13 +30,13 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCP_VAR_HH_ -#define _NETINET_TCP_VAR_HH_ +#ifndef _NETINET_TCP_VAR_H_ +#define _NETINET_TCP_VAR_H_ -#include <freebsd/netinet/tcp.h> +#include <netinet/tcp.h> #ifdef _KERNEL -#include <freebsd/net/vnet.h> +#include <net/vnet.h> /* * Kernel variables for tcp. @@ -298,9 +298,9 @@ struct hc_metrics_lite { /* must stay in sync with hc_metrics */ u_long rmx_recvpipe; /* inbound delay-bandwidth product */ }; -#ifndef _NETINET_IN_PCB_HH_ +#ifndef _NETINET_IN_PCB_H_ struct in_conninfo; -#endif /* _NETINET_IN_PCB_HH_ */ +#endif /* _NETINET_IN_PCB_H_ */ struct tcptw { struct inpcb *tw_inpcb; /* XXX back pointer to internet pcb */ @@ -490,7 +490,7 @@ void kmod_tcpstat_inc(int statnum); * Evil hack: declare only if in_pcb.h and sys/socketvar.h have been * included. Not all of our clients do. */ -#if defined(_NETINET_IN_PCB_HH_) && defined(_SYS_SOCKETVAR_HH_) +#if defined(_NETINET_IN_PCB_H_) && defined(_SYS_SOCKETVAR_H_) struct xtcpcb { size_t xt_len; struct inpcb xt_inp; @@ -684,4 +684,4 @@ u_long tcp_seq_subtract(u_long, u_long ); #endif /* _KERNEL */ -#endif /* _NETINET_TCP_VAR_HH_ */ +#endif /* _NETINET_TCP_VAR_H_ */ diff --git a/freebsd/sys/netinet/tcpip.h b/freebsd/sys/netinet/tcpip.h index 337c07a6..3a89d5d5 100644 --- a/freebsd/sys/netinet/tcpip.h +++ b/freebsd/sys/netinet/tcpip.h @@ -30,8 +30,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TCPIP_HH_ -#define _NETINET_TCPIP_HH_ +#ifndef _NETINET_TCPIP_H_ +#define _NETINET_TCPIP_H_ /* * Tcp+ip header, after ip options removed. diff --git a/freebsd/sys/netinet/toedev.h b/freebsd/sys/netinet/toedev.h index 4623845c..7edaca12 100644 --- a/freebsd/sys/netinet/toedev.h +++ b/freebsd/sys/netinet/toedev.h @@ -27,8 +27,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_TOEDEV_HH_ -#define _NETINET_TOEDEV_HH_ +#ifndef _NETINET_TOEDEV_H_ +#define _NETINET_TOEDEV_H_ #ifndef _KERNEL #error "no user-serviceable parts inside" @@ -159,4 +159,4 @@ toe_enslave(struct ifnet *bond_ifp, struct ifnet *slave_ifp) return (0); } -#endif /* _NETINET_TOEDEV_HH_ */ +#endif /* _NETINET_TOEDEV_H_ */ diff --git a/freebsd/sys/netinet/udp.h b/freebsd/sys/netinet/udp.h index e7010ac5..6841683f 100644 --- a/freebsd/sys/netinet/udp.h +++ b/freebsd/sys/netinet/udp.h @@ -1,2 +1,67 @@ -#include <freebsd/bsd.h> -#include <freebsd/netinet/udp.h> +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)udp.h 8.1 (Berkeley) 6/10/93 + * $FreeBSD$ + */ + +#ifndef _NETINET_UDP_H_ +#define _NETINET_UDP_H_ + +/* + * UDP protocol header. + * Per RFC 768, September, 1981. + */ +struct udphdr { + u_short uh_sport; /* source port */ + u_short uh_dport; /* destination port */ + u_short uh_ulen; /* udp length */ + u_short uh_sum; /* udp checksum */ +}; + +/* + * User-settable options (used with setsockopt). + */ +#define UDP_ENCAP 0x01 + + +/* + * UDP Encapsulation of IPsec Packets options. + */ +/* Encapsulation types. */ +#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ +#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-02+ */ + +/* Default ESP in UDP encapsulation port. */ +#define UDP_ENCAP_ESPINUDP_PORT 500 + +/* Maximum UDP fragment size for ESP over UDP. */ +#define UDP_ENCAP_ESPINUDP_MAXFRAGLEN 552 + +#endif diff --git a/freebsd/sys/netinet/udp_usrreq.c b/freebsd/sys/netinet/udp_usrreq.c index f992f5f6..26bdfed2 100644 --- a/freebsd/sys/netinet/udp_usrreq.c +++ b/freebsd/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 @@ -33,63 +33,63 @@ * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95 */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/local/opt_ipfw.h> -#include <freebsd/local/opt_inet6.h> -#include <freebsd/local/opt_ipsec.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/eventhandler.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/signalvar.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/sx.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/sys/syslog.h> -#include <freebsd/sys/systm.h> - -#include <freebsd/vm/uma.h> - -#include <freebsd/net/if.h> -#include <freebsd/net/route.h> - -#include <freebsd/netinet/in.h> -#include <freebsd/netinet/in_pcb.h> -#include <freebsd/netinet/in_systm.h> -#include <freebsd/netinet/in_var.h> -#include <freebsd/netinet/ip.h> +#include <rtems/bsd/local/opt_ipfw.h> +#include <rtems/bsd/local/opt_inet6.h> +#include <rtems/bsd/local/opt_ipsec.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/domain.h> +#include <sys/eventhandler.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/signalvar.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/sx.h> +#include <sys/sysctl.h> +#include <sys/syslog.h> +#include <sys/systm.h> + +#include <vm/uma.h> + +#include <net/if.h> +#include <net/route.h> + +#include <netinet/in.h> +#include <netinet/in_pcb.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> #ifdef INET6 -#include <freebsd/netinet/ip6.h> +#include <netinet/ip6.h> #endif -#include <freebsd/netinet/ip_icmp.h> -#include <freebsd/netinet/icmp_var.h> -#include <freebsd/netinet/ip_var.h> -#include <freebsd/netinet/ip_options.h> +#include <netinet/ip_icmp.h> +#include <netinet/icmp_var.h> +#include <netinet/ip_var.h> +#include <netinet/ip_options.h> #ifdef INET6 -#include <freebsd/netinet6/ip6_var.h> +#include <netinet6/ip6_var.h> #endif -#include <freebsd/netinet/udp.h> -#include <freebsd/netinet/udp_var.h> +#include <netinet/udp.h> +#include <netinet/udp_var.h> #ifdef IPSEC -#include <freebsd/netipsec/ipsec.h> -#include <freebsd/netipsec/esp.h> +#include <netipsec/ipsec.h> +#include <netipsec/esp.h> #endif -#include <freebsd/machine/in_cksum.h> +#include <machine/in_cksum.h> -#include <freebsd/security/mac/mac_framework.h> +#include <security/mac/mac_framework.h> /* * UDP protocol implementation. diff --git a/freebsd/sys/netinet/udp_var.h b/freebsd/sys/netinet/udp_var.h index 0bff6ea9..aa7ee470 100644 --- a/freebsd/sys/netinet/udp_var.h +++ b/freebsd/sys/netinet/udp_var.h @@ -31,8 +31,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_UDP_VAR_HH_ -#define _NETINET_UDP_VAR_HH_ +#ifndef _NETINET_UDP_VAR_H_ +#define _NETINET_UDP_VAR_H_ /* * UDP kernel structures and variables. |