1146773Ssam/*
2146773Ssam * Redistribution and use in source and binary forms, with or without
3146773Ssam * modification, are permitted provided that: (1) source code
4146773Ssam * distributions retain the above copyright notice and this paragraph
5146773Ssam * in its entirety, and (2) distributions including binary code include
6146773Ssam * the above copyright notice and this paragraph in its entirety in
7146773Ssam * the documentation or other materials provided with the distribution.
8146773Ssam * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
9146773Ssam * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
10146773Ssam * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11146773Ssam * FOR A PARTICULAR PURPOSE.
12146773Ssam *
13327234Semaste * Original code by Hannes Gredler (hannes@gredler.at)
14285275Spkelsey * Turned into common "text protocol" code, which this uses, by
15285275Spkelsey * Guy Harris.
16146773Ssam */
17146773Ssam
18313537Sglebius/* \summary: Session Initiation Protocol (SIP) printer */
19313537Sglebius
20146773Ssam#ifdef HAVE_CONFIG_H
21146773Ssam#include "config.h"
22146773Ssam#endif
23146773Ssam
24313537Sglebius#include <netdissect-stdinc.h>
25146773Ssam
26313537Sglebius#include "netdissect.h"
27146773Ssam#include "extract.h"
28146773Ssam
29285275Spkelseystatic const char *sipcmds[] = {
30285275Spkelsey	"ACK",
31285275Spkelsey	"BYE",
32285275Spkelsey	"CANCEL",
33285275Spkelsey	"DO",
34285275Spkelsey	"INFO",
35285275Spkelsey	"INVITE",
36285275Spkelsey	"MESSAGE",
37285275Spkelsey	"NOTIFY",
38285275Spkelsey	"OPTIONS",
39285275Spkelsey	"PRACK",
40285275Spkelsey	"QAUTH",
41285275Spkelsey	"REFER",
42285275Spkelsey	"REGISTER",
43285275Spkelsey	"SPRACK",
44285275Spkelsey	"SUBSCRIBE",
45285275Spkelsey	"UPDATE",
46285275Spkelsey	"PUBLISH",
47285275Spkelsey	NULL
48285275Spkelsey};
49285275Spkelsey
50146773Ssamvoid
51285275Spkelseysip_print(netdissect_options *ndo, const u_char *pptr, u_int len)
52146773Ssam{
53285275Spkelsey	txtproto_print(ndo, pptr, len, "sip", sipcmds, RESP_CODE_SECOND_TOKEN);
54146773Ssam}
55