mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:22:58 +00:00
Fix warnings.
svn path=/trunk/; revision=16146
This commit is contained in:
parent
aa82a6a072
commit
d160d80677
15 changed files with 68 additions and 76 deletions
|
@ -129,7 +129,7 @@ void printf __P((const char *, ...));
|
||||||
int __cdecl vprintf(const char *, va_list);
|
int __cdecl vprintf(const char *, va_list);
|
||||||
|
|
||||||
#define log bsd_log
|
#define log bsd_log
|
||||||
static int bsd_log ( int blah, const char* fmt, ... )
|
static __inline int bsd_log ( int blah, const char* fmt, ... )
|
||||||
{
|
{
|
||||||
va_list arg;
|
va_list arg;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
#ifndef _OSKITFREEBSD_H
|
#ifndef _OSKITFREEBSD_H
|
||||||
#define _OSKITFREEBSD_H
|
#define _OSKITFREEBSD_H
|
||||||
|
|
||||||
|
#include <ddk/ntddk.h>
|
||||||
|
|
||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void oskittcp_die(const char *file, int line);
|
extern void oskittcp_die(const char *file, int line);
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define DbgPrint printf
|
|
||||||
#define DbgVPrint vprintf
|
|
||||||
#else//_MSC_VER
|
|
||||||
#define printf DbgPrint
|
#define printf DbgPrint
|
||||||
#endif//_MSC_VER
|
#define vprintf DbgVPrint
|
||||||
#define ovbcopy(x,y,z) bcopy(x,y,z)
|
#define ovbcopy(x,y,z) bcopy(x,y,z)
|
||||||
void *memset( void *dest, int c, size_t count );
|
void *memset( void *dest, int c, size_t count );
|
||||||
#define bzero(x,y) memset(x,0,y)
|
#define bzero(x,y) memset(x,0,y)
|
||||||
|
@ -22,14 +20,14 @@ static inline void panic ( const char* fmt, ... )
|
||||||
{
|
{
|
||||||
va_list arg;
|
va_list arg;
|
||||||
va_start(arg, fmt);
|
va_start(arg, fmt);
|
||||||
DbgPrint ( "oskit PANIC: " );
|
printf ( "oskit PANIC: " );
|
||||||
DbgVPrint ( fmt, arg );
|
vprintf ( fmt, arg );
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
// TODO FIXME - print stack trace...
|
// TODO FIXME - print stack trace...
|
||||||
oskittcp_die("<unknown file>",-1);
|
oskittcp_die("<unknown file>",-1);
|
||||||
}
|
}
|
||||||
#else//_MSC_VER
|
#else//_MSC_VER
|
||||||
#define panic(...) do { DbgPrint(__VA_ARGS__); \
|
#define panic(...) do { printf(__VA_ARGS__); \
|
||||||
oskittcp_die(__FILE__,__LINE__); } while(0)
|
oskittcp_die(__FILE__,__LINE__); } while(0)
|
||||||
#endif//_MSC_VER
|
#endif//_MSC_VER
|
||||||
#define kmem_malloc(x,y,z) malloc(y)
|
#define kmem_malloc(x,y,z) malloc(y)
|
||||||
|
|
|
@ -189,27 +189,8 @@ sysctl_rdstruct(oldp, oldlenp, newp, sp, len)
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/*
|
|
||||||
* normally, this is a builtin function in gcc
|
|
||||||
* net/if.c doesn't seem to get it, though
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
memcmp(const void *s1v, const void *s2v, size_t size)
|
|
||||||
{
|
|
||||||
register const char *s1 = s1v, *s2 = s2v;
|
|
||||||
register unsigned int a, b;
|
|
||||||
|
|
||||||
while (size-- > 0) {
|
|
||||||
if ((a = *s1++) != (b = *s2++))
|
|
||||||
return (a-b);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bcmp(const void *b1, const void *b2, size_t len)
|
int bcmp(const void *b1, const void *b2, size_t len)
|
||||||
{
|
{
|
||||||
return memcmp(b1, b2, len);
|
return RtlCompareMemory(b1, b2, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,9 @@
|
||||||
* This structure is used to keep track of in_multi chains which belong to
|
* This structure is used to keep track of in_multi chains which belong to
|
||||||
* deleted interface addresses.
|
* deleted interface addresses.
|
||||||
*/
|
*/
|
||||||
|
#ifndef __REACTOS__
|
||||||
static LIST_HEAD(in_mk_type, multi_kludge) in_mk; /* XXX BSS initialization */
|
static LIST_HEAD(in_mk_type, multi_kludge) in_mk; /* XXX BSS initialization */
|
||||||
|
#endif
|
||||||
|
|
||||||
struct multi_kludge {
|
struct multi_kludge {
|
||||||
LIST_ENTRY(multi_kludge) mk_entry;
|
LIST_ENTRY(multi_kludge) mk_entry;
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
#include <netinet/in_var.h>
|
#include <netinet/in_var.h>
|
||||||
#include <netinet/ip_var.h>
|
#include <netinet/ip_var.h>
|
||||||
|
|
||||||
|
#include <oskittcp.h>
|
||||||
|
|
||||||
struct in_addr zeroin_addr;
|
struct in_addr zeroin_addr;
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -89,10 +91,14 @@ in_pcbbind(inp, nam)
|
||||||
struct inpcbhead *head = inp->inp_pcbinfo->listhead;
|
struct inpcbhead *head = inp->inp_pcbinfo->listhead;
|
||||||
unsigned short *lastport = &inp->inp_pcbinfo->lastport;
|
unsigned short *lastport = &inp->inp_pcbinfo->lastport;
|
||||||
struct sockaddr_in *sin;
|
struct sockaddr_in *sin;
|
||||||
|
#ifndef __REACTOS__
|
||||||
struct proc *p = curproc; /* XXX */
|
struct proc *p = curproc; /* XXX */
|
||||||
|
#endif
|
||||||
u_short lport = 0;
|
u_short lport = 0;
|
||||||
int wild = 0, reuseport = (so->so_options & SO_REUSEPORT);
|
int wild = 0, reuseport = (so->so_options & SO_REUSEPORT);
|
||||||
|
#ifndef __REACTOS__
|
||||||
int error;
|
int error;
|
||||||
|
#endif
|
||||||
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Called\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Called\n"));
|
||||||
|
|
||||||
|
@ -208,7 +214,9 @@ in_pcbladdr(inp, nam, plocal_sin)
|
||||||
struct sockaddr_in **plocal_sin;
|
struct sockaddr_in **plocal_sin;
|
||||||
{
|
{
|
||||||
struct in_ifaddr *ia;
|
struct in_ifaddr *ia;
|
||||||
|
#ifndef __REACTOS__
|
||||||
struct sockaddr_in *ifaddr = 0;
|
struct sockaddr_in *ifaddr = 0;
|
||||||
|
#endif
|
||||||
register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
|
register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
|
||||||
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Called\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Called\n"));
|
||||||
|
@ -339,7 +347,7 @@ in_pcbconnect(inp, nam)
|
||||||
/*
|
/*
|
||||||
* Call inner routine, to assign local interface address.
|
* Call inner routine, to assign local interface address.
|
||||||
*/
|
*/
|
||||||
if (error = in_pcbladdr(inp, nam, &ifaddr))
|
if ((error = in_pcbladdr(inp, nam, &ifaddr)))
|
||||||
return(error);
|
return(error);
|
||||||
|
|
||||||
if (in_pcblookuphash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port,
|
if (in_pcblookuphash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include <oskittcp.h>
|
#include <oskittcp.h>
|
||||||
#include <oskitdebug.h>
|
#include <oskitdebug.h>
|
||||||
|
#include <net/raw_cb.h>
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
@ -14,10 +16,6 @@
|
||||||
#include <sys/socketvar.h>
|
#include <sys/socketvar.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#define snprintf _snprintf
|
|
||||||
#endif//WIN32
|
|
||||||
|
|
||||||
struct linker_set domain_set;
|
struct linker_set domain_set;
|
||||||
|
|
||||||
OSKITTCP_EVENT_HANDLERS OtcpEvent = { 0 };
|
OSKITTCP_EVENT_HANDLERS OtcpEvent = { 0 };
|
||||||
|
@ -31,6 +29,10 @@ unsigned net_imask;
|
||||||
unsigned volatile ipending;
|
unsigned volatile ipending;
|
||||||
struct timeval boottime;
|
struct timeval boottime;
|
||||||
|
|
||||||
|
void clock_init();
|
||||||
|
int isprint(int c);
|
||||||
|
int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
|
||||||
|
|
||||||
void *fbsd_malloc( unsigned int bytes, ... ) {
|
void *fbsd_malloc( unsigned int bytes, ... ) {
|
||||||
if( !OtcpEvent.TCPMalloc ) panic("no malloc");
|
if( !OtcpEvent.TCPMalloc ) panic("no malloc");
|
||||||
return OtcpEvent.TCPMalloc
|
return OtcpEvent.TCPMalloc
|
||||||
|
@ -51,8 +53,6 @@ void InitOskitTCP() {
|
||||||
raw_init();
|
raw_init();
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Route Init\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Route Init\n"));
|
||||||
route_init();
|
route_init();
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Init fake freebsd scheduling\n"));
|
|
||||||
init_freebsd_sched();
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Init clock\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Init clock\n"));
|
||||||
clock_init();
|
clock_init();
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Init TCP\n"));
|
OS_DbgPrint(OSK_MID_TRACE,("Init TCP\n"));
|
||||||
|
@ -92,7 +92,7 @@ void OskitDumpBuffer( OSK_PCHAR Data, OSK_UINT Len )
|
||||||
if ( !align )
|
if ( !align )
|
||||||
{
|
{
|
||||||
if ( i ) DbgPrint( line );
|
if ( i ) DbgPrint( line );
|
||||||
snprintf ( line, sizeof(line)-1, "%08x: \n", &Data[i] );
|
_snprintf ( line, sizeof(line)-1, "%08x: \n", &Data[i] );
|
||||||
line[sizeof(line)-1] = '\0';
|
line[sizeof(line)-1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,12 +133,10 @@ int OskitTCPRecv( void *connection,
|
||||||
OSK_UINT Len,
|
OSK_UINT Len,
|
||||||
OSK_UINT *OutLen,
|
OSK_UINT *OutLen,
|
||||||
OSK_UINT Flags ) {
|
OSK_UINT Flags ) {
|
||||||
char *output_ptr = Data;
|
|
||||||
struct uio uio = { 0 };
|
struct uio uio = { 0 };
|
||||||
struct iovec iov = { 0 };
|
struct iovec iov = { 0 };
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int tcp_flags = 0;
|
int tcp_flags = 0;
|
||||||
int tocopy = 0;
|
|
||||||
|
|
||||||
*OutLen = 0;
|
*OutLen = 0;
|
||||||
|
|
||||||
|
@ -167,33 +165,11 @@ int OskitTCPRecv( void *connection,
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
getsockaddr(namp, uaddr, len)
|
|
||||||
/* [<][>][^][v][top][bottom][index][help] */
|
|
||||||
struct sockaddr **namp;
|
|
||||||
caddr_t uaddr;
|
|
||||||
size_t len;
|
|
||||||
{
|
|
||||||
struct sockaddr *sa;
|
|
||||||
int error;
|
|
||||||
|
|
||||||
if (len > SOCK_MAXADDRLEN)
|
|
||||||
return ENAMETOOLONG;
|
|
||||||
MALLOC(sa, struct sockaddr *, len, M_SONAME, M_WAITOK);
|
|
||||||
error = copyin(uaddr, sa, len);
|
|
||||||
if (error) {
|
|
||||||
FREE(sa, M_SONAME);
|
|
||||||
} else {
|
|
||||||
*namp = sa;
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int OskitTCPBind( void *socket, void *connection,
|
int OskitTCPBind( void *socket, void *connection,
|
||||||
void *nam, OSK_UINT namelen ) {
|
void *nam, OSK_UINT namelen ) {
|
||||||
int error = EFAULT;
|
int error = EFAULT;
|
||||||
struct socket *so = socket;
|
struct socket *so = socket;
|
||||||
struct mbuf sabuf = { 0 };
|
struct mbuf sabuf;
|
||||||
struct sockaddr addr;
|
struct sockaddr addr;
|
||||||
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Called, socket = %08x\n", socket));
|
OS_DbgPrint(OSK_MID_TRACE,("Called, socket = %08x\n", socket));
|
||||||
|
@ -201,6 +177,7 @@ int OskitTCPBind( void *socket, void *connection,
|
||||||
if( nam )
|
if( nam )
|
||||||
addr = *((struct sockaddr *)nam);
|
addr = *((struct sockaddr *)nam);
|
||||||
|
|
||||||
|
RtlZeroMemory(&sabuf, sizeof(sabuf));
|
||||||
sabuf.m_data = (void *)&addr;
|
sabuf.m_data = (void *)&addr;
|
||||||
sabuf.m_len = sizeof(addr);
|
sabuf.m_len = sizeof(addr);
|
||||||
|
|
||||||
|
@ -216,11 +193,8 @@ int OskitTCPBind( void *socket, void *connection,
|
||||||
int OskitTCPConnect( void *socket, void *connection,
|
int OskitTCPConnect( void *socket, void *connection,
|
||||||
void *nam, OSK_UINT namelen ) {
|
void *nam, OSK_UINT namelen ) {
|
||||||
struct socket *so = socket;
|
struct socket *so = socket;
|
||||||
struct connect_args _uap = {
|
int error = EFAULT;
|
||||||
0, nam, namelen
|
struct mbuf sabuf;
|
||||||
}, *uap = &_uap;
|
|
||||||
int error = EFAULT, s;
|
|
||||||
struct mbuf sabuf = { 0 };
|
|
||||||
struct sockaddr addr;
|
struct sockaddr addr;
|
||||||
|
|
||||||
OS_DbgPrint(OSK_MID_TRACE,("Called, socket = %08x\n", socket));
|
OS_DbgPrint(OSK_MID_TRACE,("Called, socket = %08x\n", socket));
|
||||||
|
@ -236,6 +210,7 @@ int OskitTCPConnect( void *socket, void *connection,
|
||||||
if( nam )
|
if( nam )
|
||||||
addr = *((struct sockaddr *)nam);
|
addr = *((struct sockaddr *)nam);
|
||||||
|
|
||||||
|
RtlZeroMemory(&sabuf, sizeof(sabuf));
|
||||||
sabuf.m_data = (void *)&addr;
|
sabuf.m_data = (void *)&addr;
|
||||||
sabuf.m_len = sizeof(addr);
|
sabuf.m_len = sizeof(addr);
|
||||||
|
|
||||||
|
@ -264,7 +239,6 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
int OskitTCPShutdown( void *socket, int disconn_type ) {
|
int OskitTCPShutdown( void *socket, int disconn_type ) {
|
||||||
struct socket *so = socket;
|
|
||||||
return soshutdown( socket, disconn_type );
|
return soshutdown( socket, disconn_type );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,10 @@
|
||||||
u_short ip_id;
|
u_short ip_id;
|
||||||
|
|
||||||
static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
|
static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
|
||||||
|
#ifndef __REACTOS__
|
||||||
static void ip_mloopback
|
static void ip_mloopback
|
||||||
__P((struct ifnet *, struct mbuf *, struct sockaddr_in *));
|
__P((struct ifnet *, struct mbuf *, struct sockaddr_in *));
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IP output. The packet in mbuf chain m contains a skeletal IP
|
* IP output. The packet in mbuf chain m contains a skeletal IP
|
||||||
|
@ -81,7 +83,9 @@ ip_output(m0, opt, ro, flags, imo)
|
||||||
struct ip_moptions *imo;
|
struct ip_moptions *imo;
|
||||||
{
|
{
|
||||||
register struct ip *ip, *mhip;
|
register struct ip *ip, *mhip;
|
||||||
|
#ifndef __REACTOS__
|
||||||
register struct ifnet *ifp;
|
register struct ifnet *ifp;
|
||||||
|
#endif
|
||||||
register struct mbuf *m = m0;
|
register struct mbuf *m = m0;
|
||||||
register int hlen = sizeof (struct ip);
|
register int hlen = sizeof (struct ip);
|
||||||
int len, off, error = 0;
|
int len, off, error = 0;
|
||||||
|
@ -340,8 +344,8 @@ ip_output(m0, opt, ro, flags, imo)
|
||||||
m->m_flags &= ~M_BCAST;
|
m->m_flags &= ~M_BCAST;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sendit:
|
|
||||||
#ifndef __REACTOS__
|
#ifndef __REACTOS__
|
||||||
|
sendit:
|
||||||
/*
|
/*
|
||||||
* Check with the firewall...
|
* Check with the firewall...
|
||||||
*/
|
*/
|
||||||
|
@ -382,6 +386,7 @@ sendit:
|
||||||
*/
|
*/
|
||||||
if (ip->ip_off & IP_DF) {
|
if (ip->ip_off & IP_DF) {
|
||||||
error = EMSGSIZE;
|
error = EMSGSIZE;
|
||||||
|
#ifndef __REACTOS__
|
||||||
#if 1
|
#if 1
|
||||||
/*
|
/*
|
||||||
* This case can happen if the user changed the MTU
|
* This case can happen if the user changed the MTU
|
||||||
|
@ -395,6 +400,7 @@ sendit:
|
||||||
&& (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) {
|
&& (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) {
|
||||||
ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu;
|
ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
ipstat.ips_cantfrag++;
|
ipstat.ips_cantfrag++;
|
||||||
goto bad;
|
goto bad;
|
||||||
|
@ -509,8 +515,9 @@ sendorfree:
|
||||||
ipstat.ips_fragmented++;
|
ipstat.ips_fragmented++;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (ro == &iproute && (flags & IP_ROUTETOIF) == 0 && ro->ro_rt)
|
if (ro == &iproute && (flags & IP_ROUTETOIF) == 0 && ro->ro_rt) {
|
||||||
RTFREE(ro->ro_rt);
|
RTFREE(ro->ro_rt);
|
||||||
|
}
|
||||||
|
|
||||||
return (error);
|
return (error);
|
||||||
bad:
|
bad:
|
||||||
|
@ -773,7 +780,7 @@ ip_pcbopts(pcbopt, m)
|
||||||
struct mbuf **pcbopt;
|
struct mbuf **pcbopt;
|
||||||
register struct mbuf *m;
|
register struct mbuf *m;
|
||||||
{
|
{
|
||||||
register cnt, optlen;
|
register int cnt, optlen;
|
||||||
register u_char *cp;
|
register u_char *cp;
|
||||||
u_char opt;
|
u_char opt;
|
||||||
|
|
||||||
|
@ -875,15 +882,19 @@ ip_setmoptions(optname, imop, m)
|
||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
{
|
{
|
||||||
register int error = 0;
|
register int error = 0;
|
||||||
|
#ifndef __REACTOS__
|
||||||
u_char loop;
|
u_char loop;
|
||||||
register int i;
|
register int i;
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
register struct ip_mreq *mreq;
|
register struct ip_mreq *mreq;
|
||||||
register struct ifnet *ifp;
|
register struct ifnet *ifp;
|
||||||
|
#endif
|
||||||
register struct ip_moptions *imo = *imop;
|
register struct ip_moptions *imo = *imop;
|
||||||
|
#ifndef __REACTOS__
|
||||||
struct route ro;
|
struct route ro;
|
||||||
register struct sockaddr_in *dst;
|
register struct sockaddr_in *dst;
|
||||||
int s;
|
int s;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (imo == NULL) {
|
if (imo == NULL) {
|
||||||
/*
|
/*
|
||||||
|
@ -1149,10 +1160,12 @@ ip_getmoptions(optname, imo, mp)
|
||||||
register struct ip_moptions *imo;
|
register struct ip_moptions *imo;
|
||||||
register struct mbuf **mp;
|
register struct mbuf **mp;
|
||||||
{
|
{
|
||||||
|
#ifndef __REACTOS__
|
||||||
u_char *ttl;
|
u_char *ttl;
|
||||||
u_char *loop;
|
u_char *loop;
|
||||||
struct in_addr *addr;
|
struct in_addr *addr;
|
||||||
struct in_ifaddr *ia;
|
struct in_ifaddr *ia;
|
||||||
|
#endif
|
||||||
|
|
||||||
*mp = m_get(M_WAIT, MT_SOOPTS);
|
*mp = m_get(M_WAIT, MT_SOOPTS);
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,9 @@ rip_output(m, so, dst)
|
||||||
{
|
{
|
||||||
register struct ip *ip;
|
register struct ip *ip;
|
||||||
register struct inpcb *inp = sotoinpcb(so);
|
register struct inpcb *inp = sotoinpcb(so);
|
||||||
|
#ifndef __REACTOS__
|
||||||
struct mbuf *opts;
|
struct mbuf *opts;
|
||||||
|
#endif
|
||||||
int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;
|
int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -365,7 +365,9 @@ ifa_ifwithroute(flags, dst, gateway)
|
||||||
|
|
||||||
#define ROUNDUP(a) (a>0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
|
#define ROUNDUP(a) (a>0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
static int rt_fixdelete(struct radix_node *, void *);
|
static int rt_fixdelete(struct radix_node *, void *);
|
||||||
|
#endif
|
||||||
static int rt_fixchange(struct radix_node *, void *);
|
static int rt_fixchange(struct radix_node *, void *);
|
||||||
|
|
||||||
struct rtfc_arg {
|
struct rtfc_arg {
|
||||||
|
@ -385,7 +387,9 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
|
||||||
register struct radix_node_head *rnh;
|
register struct radix_node_head *rnh;
|
||||||
struct ifaddr *ifa;
|
struct ifaddr *ifa;
|
||||||
struct sockaddr *ndst;
|
struct sockaddr *ndst;
|
||||||
|
#ifndef __REACTOS__
|
||||||
u_long prflags = 0UL;
|
u_long prflags = 0UL;
|
||||||
|
#endif
|
||||||
#define senderr(x) { error = x ; goto bad; }
|
#define senderr(x) { error = x ; goto bad; }
|
||||||
|
|
||||||
if ((rnh = rt_tables[dst->sa_family]) == 0)
|
if ((rnh = rt_tables[dst->sa_family]) == 0)
|
||||||
|
@ -561,6 +565,7 @@ bad:
|
||||||
* rnh->rnh_walktree_from() above, and those that actually are children of
|
* rnh->rnh_walktree_from() above, and those that actually are children of
|
||||||
* the late parent (passed in as VP here) are themselves deleted.
|
* the late parent (passed in as VP here) are themselves deleted.
|
||||||
*/
|
*/
|
||||||
|
#ifndef __REACTOS__
|
||||||
static int
|
static int
|
||||||
rt_fixdelete(struct radix_node *rn, void *vp)
|
rt_fixdelete(struct radix_node *rn, void *vp)
|
||||||
{
|
{
|
||||||
|
@ -574,6 +579,7 @@ rt_fixdelete(struct radix_node *rn, void *vp)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine is called from rt_setgate() to do the analogous thing for
|
* This routine is called from rt_setgate() to do the analogous thing for
|
||||||
|
|
|
@ -206,8 +206,8 @@ route_output(m, so)
|
||||||
case RTM_LOCK:
|
case RTM_LOCK:
|
||||||
if ((rnh = rt_tables[dst->sa_family]) == 0) {
|
if ((rnh = rt_tables[dst->sa_family]) == 0) {
|
||||||
senderr(EAFNOSUPPORT);
|
senderr(EAFNOSUPPORT);
|
||||||
} else if (rt = (struct rtentry *)
|
} else if ((rt = (struct rtentry *)
|
||||||
rnh->rnh_lookup(dst, netmask, rnh))
|
rnh->rnh_lookup(dst, netmask, rnh)))
|
||||||
rt->rt_refcnt++;
|
rt->rt_refcnt++;
|
||||||
else
|
else
|
||||||
senderr(ESRCH);
|
senderr(ESRCH);
|
||||||
|
|
|
@ -83,8 +83,10 @@ tcp_trace(act, ostate, tp, ti, req)
|
||||||
struct tcpiphdr *ti;
|
struct tcpiphdr *ti;
|
||||||
int req;
|
int req;
|
||||||
{
|
{
|
||||||
|
#ifdef TCPDEBUG
|
||||||
tcp_seq seq, ack;
|
tcp_seq seq, ack;
|
||||||
int len, flags;
|
int len, flags;
|
||||||
|
#endif
|
||||||
struct tcp_debug *td = &tcp_debug[tcp_debx++];
|
struct tcp_debug *td = &tcp_debug[tcp_debx++];
|
||||||
|
|
||||||
if (tcp_debx == TCP_NDEBUG)
|
if (tcp_debx == TCP_NDEBUG)
|
||||||
|
|
|
@ -516,7 +516,7 @@ findpcb:
|
||||||
* if the segment has a CC option equal to CCrecv
|
* if the segment has a CC option equal to CCrecv
|
||||||
*/
|
*/
|
||||||
((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) ||
|
((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) ||
|
||||||
(to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv) &&
|
((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) &&
|
||||||
ti->ti_seq == tp->rcv_nxt &&
|
ti->ti_seq == tp->rcv_nxt &&
|
||||||
tiwin && tiwin == tp->snd_wnd &&
|
tiwin && tiwin == tp->snd_wnd &&
|
||||||
tp->snd_nxt == tp->snd_max) {
|
tp->snd_nxt == tp->snd_max) {
|
||||||
|
|
|
@ -780,7 +780,7 @@ void
|
||||||
tcp_setpersist(tp)
|
tcp_setpersist(tp)
|
||||||
register struct tcpcb *tp;
|
register struct tcpcb *tp;
|
||||||
{
|
{
|
||||||
register t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
|
register int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
|
||||||
|
|
||||||
if (tp->t_timer[TCPT_REXMT])
|
if (tp->t_timer[TCPT_REXMT])
|
||||||
panic("tcp_output REXMT");
|
panic("tcp_output REXMT");
|
||||||
|
|
|
@ -101,7 +101,9 @@ m_clalloc(ncl, nowait)
|
||||||
register int ncl;
|
register int ncl;
|
||||||
int nowait;
|
int nowait;
|
||||||
{
|
{
|
||||||
|
#ifndef __REACTOS__
|
||||||
static int logged;
|
static int logged;
|
||||||
|
#endif
|
||||||
register caddr_t p;
|
register caddr_t p;
|
||||||
register int i;
|
register int i;
|
||||||
int npg;
|
int npg;
|
||||||
|
@ -456,7 +458,7 @@ m_adj(mp, req_len)
|
||||||
{
|
{
|
||||||
register int len = req_len;
|
register int len = req_len;
|
||||||
register struct mbuf *m;
|
register struct mbuf *m;
|
||||||
register count;
|
register int count;
|
||||||
|
|
||||||
if ((m = mp) == NULL)
|
if ((m = mp) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -71,7 +71,9 @@ socreate(dom, aso, type, proto)
|
||||||
register int type;
|
register int type;
|
||||||
int proto;
|
int proto;
|
||||||
{
|
{
|
||||||
|
#ifndef __REACTOS__
|
||||||
struct proc *p = curproc; /* XXX */
|
struct proc *p = curproc; /* XXX */
|
||||||
|
#endif
|
||||||
register struct protosw *prp;
|
register struct protosw *prp;
|
||||||
register struct socket *so;
|
register struct socket *so;
|
||||||
register int error;
|
register int error;
|
||||||
|
@ -335,7 +337,9 @@ sosend(so, addr, uio, top, control, flags)
|
||||||
struct mbuf *control;
|
struct mbuf *control;
|
||||||
int flags;
|
int flags;
|
||||||
{
|
{
|
||||||
|
#ifndef __REACTOS__
|
||||||
struct proc *p = curproc; /* XXX */
|
struct proc *p = curproc; /* XXX */
|
||||||
|
#endif
|
||||||
struct mbuf **mp;
|
struct mbuf **mp;
|
||||||
register struct mbuf *m;
|
register struct mbuf *m;
|
||||||
register long space, len, resid;
|
register long space, len, resid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue