"sip_is_request()" is intended to indicate whether a given SIP packet is
a request or reply; make its return value "gboolean", and have it just return TRUE or FALSE. Also make an array index variable unsigned, to squelch a GCC warning. Support for additional SIP methods, from Jean-Francois Mule. svn path=/trunk/; revision=3865
This commit is contained in:
parent
7111f83013
commit
ecccb6e061
4
AUTHORS
4
AUTHORS
|
@ -767,6 +767,10 @@ Terje Krogdahl <tekr[AT]nextra.com> {
|
|||
Additional AVPs, and Event-Timestamp support, in RADIUS
|
||||
}
|
||||
|
||||
Jean-Francois Mule <jfmule[AT]clarent.com> {
|
||||
Additional SIP methods
|
||||
}
|
||||
|
||||
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
|
||||
give his permission to use his version of snprintf.c.
|
||||
|
||||
|
|
|
@ -1152,6 +1152,7 @@ B<http://www.ethereal.com>.
|
|||
Lee Berger <lberger[AT]roy.org>
|
||||
Motonori Shindo <mshindo[AT]mshindo.net>
|
||||
Terje Krogdahl <tekr[AT]nextra.com>
|
||||
Jean-Francois Mule <jfmule[AT]clarent.com>
|
||||
|
||||
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his
|
||||
permission to use his version of snprintf.c.
|
||||
|
|
28
packet-sip.c
28
packet-sip.c
|
@ -4,13 +4,21 @@
|
|||
*
|
||||
* TODO: Pay attention to Content-Type: It might not always be SDP.
|
||||
* Add hf_* fields for filtering support.
|
||||
* Add sip msg body dissection based on Content-Type for:
|
||||
* SDP, MIME, and other types
|
||||
* Align SIP methods with recent Internet Drafts or RFC
|
||||
* (SIP INFO, rfc2976 - done)
|
||||
* (SIP SUBSCRIBE-NOTIFY - done)
|
||||
* (SIP REFER - done)
|
||||
* check for other
|
||||
*
|
||||
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
* Copyright 2001, Jean-Francois Mule <jfm@clarent.com>
|
||||
*
|
||||
* $Id: packet-sip.c,v 1.15 2001/06/18 02:17:52 guy Exp $
|
||||
* $Id: packet-sip.c,v 1.16 2001/08/23 00:18:56 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* Copied from packet-cops.c
|
||||
|
@ -59,10 +67,14 @@ static const char *sip_methods[] = {
|
|||
"OPTIONS",
|
||||
"BYE",
|
||||
"CANCEL",
|
||||
"REGISTER"
|
||||
"REGISTER",
|
||||
"INFO",
|
||||
"REFER",
|
||||
"SUBSCRIBE",
|
||||
"NOTIFY"
|
||||
};
|
||||
|
||||
static int sip_is_request(tvbuff_t *tvb, guint32 offset);
|
||||
static gboolean sip_is_request(tvbuff_t *tvb, guint32 offset);
|
||||
static gint sip_get_msg_offset(tvbuff_t *tvb, guint32 offset);
|
||||
|
||||
static dissector_handle_t sdp_handle;
|
||||
|
@ -164,16 +176,16 @@ static gint sip_get_msg_offset(tvbuff_t *tvb, guint32 offset)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int sip_is_request(tvbuff_t *tvb, guint32 offset)
|
||||
static gboolean sip_is_request(tvbuff_t *tvb, guint32 offset)
|
||||
{
|
||||
int i;
|
||||
u_int i;
|
||||
|
||||
for (i = 1; i < array_length(sip_methods); i++) {
|
||||
if (tvb_strneql(tvb, offset, sip_methods[i], strlen(sip_methods[i])) == 0)
|
||||
return i;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Register the protocol with Ethereal */
|
||||
|
|
Loading…
Reference in New Issue