ip_rcmd_pxy.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (C) 1998-2003 by Darren Reed
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id: ip_rcmd_pxy.c,v 1.32 2003/06/28 17:01:58 darrenr Exp $
*
* Copyright 2003 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"
#if 0
#endif
#else
# ifdef USE_MUTEXES
extern ipfmutex_t ipf_rw;
# endif
#endif
#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;
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;
}