ip_raudio_pxy.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (C) 1998-2003 by Darren Reed
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id: ip_raudio_pxy.c,v 1.35 2003/06/28 17:01:58 darrenr Exp $
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef USE_MUTEXES
extern ipfmutex_t ipf_rw;
#endif
#define IPF_RAUDIO_PROXY
int ippr_raudio_init __P((void));
void ippr_raudio_fini __P((void));
int raudio_proxy_init = 0;
/*
* Real Audio application proxy initialization.
*/
int ippr_raudio_init()
{
raudio_proxy_init = 1;
return 0;
}
void ippr_raudio_fini()
{
if (raudio_proxy_init == 1) {
raudio_proxy_init = 0;
}
}
/*
* Setup for a new proxy to handle Real Audio.
*/
{
return -1;
return 0;
}
{
int len = 0;
mb_t *m;
/*
* If we've already processed the start messages, then nothing left
* for the proxy to do.
*/
return 0;
if (dlen <= 0)
return 0;
/*
* In all the startup parsing, ensure that we don't go outside
* the packet buffer boundary.
*/
/*
* Look for the start of connection "PNA" string if not seen yet.
*/
if (rap->rap_seenpna == 0) {
if (s == NULL)
return 0;
s += 3;
} else
s = membuf;
/*
* Directly after the PNA will be the version number of this
* connection.
*/
s += 2;
} else
return 0;
}
/*
* Now that we've been past the PNA and version number, we're into the
* startup messages block. This ends when a message with an ID of 0.
*/
s += 2;
break;
}
} else if (rap->rap_gotlen == 0) {
s += 2;
}
} else if (id == RA_ID_ROBUST) {
}
s += len;
rap->rap_gotlen = 0;
}
}
return 0;
}
{
mb_t *m;
/*
* Wait until we've seen the end of the start messages and even then
* only proceed further if we're using UDP. If they want to use TCP
* then data is sent back on the same channel that is already open.
*/
return 0;
if (dlen <= 0)
return 0;
/*
* Check to see if the data in this packet is of interest to us.
* We only care for the first 19 bytes coming back from the server.
*/
if (s == NULL)
return 0;
a1 = 0;
/*
* seq # which is the start of data and from that the offset
* into the buffer array.
*/
s = membuf;
} else
return 0;
}
return 0;
s += 2;
}
(rap->rap_srport != 0)) {
}
}
}
}
return 0;
}