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