ip_rcmd_pxy.c revision ab25eeb551a4be927a4b6ae2cf8aff7ed17decb4
/*
* Copyright (C) 1998-2003 by Darren Reed
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id: ip_rcmd_pxy.c,v 1.41.2.4 2005/02/04 10:22:55 darrenr Exp $
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Simple RCMD transparent proxy for in-kernel use. For use with the NAT
* code.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#define IPF_RCMD_PROXY
int ippr_rcmd_init __P((void));
void ippr_rcmd_fini __P((void));
int rcmd_proxy_init = 0;
/*
* RCMD application proxy initialization.
*/
int ippr_rcmd_init()
{
rcmd_proxy_init = 1;
return 0;
}
void ippr_rcmd_fini()
{
if (rcmd_proxy_init == 1) {
rcmd_proxy_init = 0;
}
}
/*
* Setup for a new RCMD proxy.
*/
{
#ifdef IP_RCMD_PROXY_DEBUG
#endif
return -1;
}
return 0;
}
/*
* ipf_rcmd_atoi - implement a simple version of atoi
*/
char *ptr;
{
register char *s = ptr, c;
register u_short i = 0;
while (((c = *s++) != '\0') && ISDIGIT(c)) {
i *= 10;
i += c - '0';
}
return i;
}
{
char portbuf[8], *s;
mb_t *m;
return 0;
}
return 0;
#ifdef __sgi
#else
#endif
if (dlen <= 0)
return 0;
s = portbuf;
sp = ipf_rcmd_atoi(s);
if (sp == 0) {
#ifdef IP_RCMD_PROXY_DEBUG
printf("ippr_rcmd_portmsg:sp == 0 dlen %d [%s]\n",
#endif
return 0;
}
/*
* Add skeleton NAT entry for connection which will come back the
* other way.
*/
else
int slen;
} else {
}
}
}
}
return 0;
}
{
return 0;
}
{
return 0;
}