forked from Imagelibrary/rtems
network: Fix warnings
This commit is contained in:
@@ -78,6 +78,8 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "res_config.h"
|
||||
|
||||
#define BIND_4_COMPAT
|
||||
|
||||
/*
|
||||
|
||||
@@ -435,7 +435,7 @@ if_slowtimo(void *arg)
|
||||
* Map interface name to
|
||||
* interface structure pointer.
|
||||
*/
|
||||
struct ifnet *
|
||||
static struct ifnet *
|
||||
ifunit(char *name)
|
||||
{
|
||||
char *cp;
|
||||
@@ -715,7 +715,7 @@ ifconf(u_long cmd, caddr_t data)
|
||||
struct ifconf *ifc = (struct ifconf *)data;
|
||||
struct ifnet *ifp = ifnet;
|
||||
struct ifaddr *ifa;
|
||||
struct ifreq ifr, *ifrp;
|
||||
struct ifreq ifr;
|
||||
char *ifrpc;
|
||||
int space = ifc->ifc_len, error = 0;
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
#include <netinet/in_var.h>
|
||||
#include <netinet/ip_var.h>
|
||||
|
||||
#ifdef IPDIVERT
|
||||
|
||||
/*
|
||||
* Divert sockets
|
||||
*/
|
||||
@@ -380,3 +382,4 @@ release:
|
||||
m_freem(m);
|
||||
return (error);
|
||||
}
|
||||
#endif /* IPDIVERT */
|
||||
|
||||
@@ -223,6 +223,14 @@ int ioctl (int, ioctl_command_t, ...);
|
||||
|
||||
struct socket *rtems_bsdnet_fdToSocket(int fd);
|
||||
|
||||
void sysctl_register_all(void *);
|
||||
|
||||
void rtems_set_udp_buffer_sizes(u_long, u_long);
|
||||
|
||||
void rtems_set_tcp_buffer_sizes(u_long, u_long);
|
||||
|
||||
void rtems_set_sb_efficiency(u_long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <sys/callout.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <net/if.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -36,11 +37,6 @@
|
||||
|
||||
#include "loop.h"
|
||||
|
||||
/*
|
||||
* Sysctl init all.
|
||||
*/
|
||||
void sysctl_register_all(void *arg);
|
||||
|
||||
/*
|
||||
* Memory allocation
|
||||
*/
|
||||
@@ -264,13 +260,6 @@ bsd_init (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* RTEMS Specific Helper Routines
|
||||
*/
|
||||
extern void rtems_set_udp_buffer_sizes( u_long, u_long );
|
||||
extern void rtems_set_tcp_buffer_sizes( u_long, u_long );
|
||||
extern void rtems_set_sb_efficiency( u_long );
|
||||
|
||||
/*
|
||||
* Initialize and start network operations
|
||||
*/
|
||||
@@ -843,8 +832,11 @@ rtems_bsdnet_log (int priority, const char *fmt, ...)
|
||||
/*
|
||||
* IP header checksum routine for processors which don't have an inline version
|
||||
*/
|
||||
|
||||
u_int in_cksum_hdr(const struct ip *);
|
||||
|
||||
u_int
|
||||
in_cksum_hdr (const void *ip)
|
||||
in_cksum_hdr (const struct ip *ip)
|
||||
{
|
||||
uint32_t sum;
|
||||
const uint16_t *sp;
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/icmp_var.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Display ICMP statistics
|
||||
* Don't lock the rest of the network tasks out while printing.
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Display an address
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_var.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Display IP statistics
|
||||
* Don't lock the rest of the network tasks out while printing.
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/mbuf.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Display MBUF statistics
|
||||
* Don't lock the rest of the network tasks out while printing.
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#undef random
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Information per route
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <netinet/tcp_seq.h>
|
||||
#include <netinet/tcp_var.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Display TCP statistics
|
||||
* Don't lock the rest of the network tasks out while printing.
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/udp_var.h>
|
||||
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
/*
|
||||
* Display UDP statistics
|
||||
* Don't lock the rest of the network tasks out while printing.
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "rtems_syscall.h"
|
||||
|
||||
int socketpair (int domain, int type, int protocol, int *rsv)
|
||||
{
|
||||
if ( !rsv ) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
Reference in New Issue
Block a user