network: Header file compatiblity

Move legacy network stack implementation specifics to
<rtems/rtems_bsdnet_internal.h>.  Include missing header files.  Add
interface flags compatibility.

Update #2833.
This commit is contained in:
Sebastian Huber
2017-06-07 07:24:00 +02:00
parent e744c36c3f
commit 26ccd139dc
11 changed files with 39 additions and 21 deletions

View File

@@ -124,11 +124,11 @@ struct if_data {
#define IFF_LOOPBACK 0x8 /* is a loopback net */
#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
#define IFF_SMART 0x20 /* interface manages own routes */
#define IFF_RUNNING 0x40 /* resources allocated */
#define IFF_DRV_RUNNING 0x40 /* resources allocated */
#define IFF_NOARP 0x80 /* no address resolution protocol */
#define IFF_PROMISC 0x100 /* receive all packets */
#define IFF_ALLMULTI 0x200 /* receive all multicast packets */
#define IFF_OACTIVE 0x400 /* tx hardware queue is full */
#define IFF_DRV_OACTIVE 0x400 /* tx hardware queue is full */
#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */
#define IFF_LINK0 0x1000 /* per link layer defined bit */
#define IFF_LINK1 0x2000 /* per link layer defined bit */
@@ -292,10 +292,6 @@ __END_DECLS
/* XXX - this should go away soon. */
#include <net/if_var.h>
void ifafree(struct ifaddr *);
int looutput(struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *);
#endif
#endif /* !_NET_IF_H_ */

View File

@@ -44,8 +44,6 @@ 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 */
typedef u_long tcp_cc; /* connection count per rfc1644 */
/*
* TCP header.
* Per RFC 793, September, 1981.
@@ -91,19 +89,6 @@ struct tcphdr {
#define TCPOPT_TIMESTAMP 8L
#define TCPOLEN_TIMESTAMP 10L
#define TCPOLEN_TSTAMP_APPA (uint32_t)(TCPOLEN_TIMESTAMP+2) /* appendix A */
#define TCPOPT_TSTAMP_HDR \
(uint32_t)(((uint32_t)TCPOPT_NOP<<24)| \
((uint32_t)TCPOPT_NOP<<16)| \
((uint32_t)TCPOPT_TIMESTAMP<<8)| \
((uint32_t)TCPOLEN_TIMESTAMP))
#define TCPOPT_CC 11 /* CC options: RFC-1644 */
#define TCPOPT_CCNEW 12
#define TCPOPT_CCECHO 13
#define TCPOLEN_CC 6
#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
#define TCPOPT_CC_HDR(ccopt) \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
/*
* Default maximum segment size for TCP.

View File

@@ -100,6 +100,7 @@ struct arpreq {
#define ATF_USETRAILERS 0x10 /* has requested trailers */
#ifdef _KERNEL
#include <net/if_var.h>
/*
* Structure shared between the ethernet driver modules and
* the address resolution code. For example, each ec_softc or il_softc

View File

@@ -56,6 +56,7 @@
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/netisr.h>
#include <net/route.h>

View File

@@ -48,6 +48,7 @@
#include <sys/protosw.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
#include <net/raw_cb.h>

View File

@@ -35,6 +35,7 @@
#include <sys/time.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
#include <netinet/in.h>
#include <rtems/rtems_netinet_in.h>

View File

@@ -52,6 +52,7 @@
#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
#include <netinet/in.h>

View File

@@ -55,6 +55,7 @@
#include <sys/uio.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
#include <netinet/in.h>

View File

@@ -249,6 +249,35 @@ void rtems_set_tcp_buffer_sizes(u_long, u_long);
void rtems_set_sb_efficiency(u_long);
#define IFF_OACTIVE IFF_DRV_OACTIVE
#define IFF_RUNNING IFF_DRV_RUNNING
struct ifaddr;
void ifafree(struct ifaddr *);
struct ifnet;
struct mbuf;
struct sockaddr;
struct rtentry;
int looutput(struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *);
typedef u_long tcp_cc; /* connection count per rfc1644 */
#define TCPOPT_TSTAMP_HDR \
(uint32_t)(((uint32_t)TCPOPT_NOP<<24)| \
((uint32_t)TCPOPT_NOP<<16)| \
((uint32_t)TCPOPT_TIMESTAMP<<8)| \
((uint32_t)TCPOLEN_TIMESTAMP))
#define TCPOPT_CC 11 /* CC options: RFC-1644 */
#define TCPOPT_CCNEW 12
#define TCPOPT_CCECHO 13
#define TCPOLEN_CC 6
#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
#define TCPOPT_CC_HDR(ccopt) \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
#ifdef __cplusplus
}
#endif

View File

@@ -12,6 +12,7 @@
#include <sys/sockio.h>
#include <sys/mbuf.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h>
#include <net/if_types.h>
#include <netinet/in.h>

View File

@@ -14,6 +14,7 @@
#include <sys/domain.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h>
#include <net/route.h>