/*
* Copyright 2001, QNX Software Systems Ltd. All Rights Reserved
*
* This source code has been published by QNX Software Systems Ltd. (QSSL).
* However, any use, reproduction, modification, distribution or transfer of
* this software, or any software which includes or is based upon any of this
* code, is only permitted under the terms of the QNX Open Community License
* version 1.0 (see licensing.qnx.com for details) or as otherwise expressly
* authorized by a written license agreement from QSSL. For more information,
* please email licensing@qnx.com.
*
* For more details, see QNX_OCL.txt provided with this distribution.
*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Simple H.323 proxy
*
* by xtang@canada.com
* ported to ipfilter 3.4.20 by Michael Grant mg-ipf@grant.org
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#else
# ifndef linux
# endif
#endif
#define IPF_H323_PROXY
typedef struct ifs_h323pxy {
int h323_proxy_init;
int ipaddr;
unsigned short *port;
{
int offset;
if (datlen < 6)
return -1;
*port = 0;
{
break;
}
}
}
/*
* Initialize local structures.
*/
/*ARGSUSED*/
void **private;
{
return -1;
return 0;
}
/*ARGSUSED*/
void **private;
{
ifsh323->h323_proxy_init = 0;
}
}
/*ARGSUSED*/
void *private;
{
return 0;
}
/*ARGSUSED*/
void *private;
{
int i;
{
/*
* Check the comment in ippr_h323_in() function,
* just above fr_nat_ioctl() call.
* We are lucky here because this function is not
* called with ipf_nat locked.
*/
/*EMPTY*/;
/* log the error */
}
}
/* avoid double free */
}
return;
}
/*ARGSUSED*/
void *private;
{
unsigned short port;
char *newarray;
/* setup a nat rule to set a h245 proxy on tcp-port "port"
* it's like:
* map <if> <inter_ip>/<mask> -> <gate_ip>/<mask> proxy port <port> <port>/tcp
*/
return -1;
}
/*
* we got a problem here. we need to call fr_nat_ioctl() to add
* the h245 proxy rule, but since we already hold (READ locked)
* the nat table rwlock (ipf_nat), if we go into fr_nat_ioctl(),
* it will try to WRITE lock it. This will causing dead lock
* on RTP.
*
* The quick & dirty solution here is release the read lock,
* call fr_nat_ioctl() and re-lock it.
* A (maybe better) solution is do a UPGRADE(), and instead
* of calling fr_nat_ioctl(), we add the nat rule ourself.
*/
return -1;
}
}
}
return 0;
}
/*ARGSUSED*/
void *private;
{
return 0;
}
/*ARGSUSED*/
void *private;
{
/* port = htons(port); */
#ifdef IPFILTER_LOG
ifs);
#endif
}
}
}
return 0;
}