xref: /freebsd/contrib/tcpdump/print-rtsp.c (revision 0a7e5f1f02aad2ff5fff1c60f44c6975fd07e1d9)
18bdc5a62SPatrick Kelsey /*
28bdc5a62SPatrick Kelsey  * Redistribution and use in source and binary forms, with or without
38bdc5a62SPatrick Kelsey  * modification, are permitted provided that: (1) source code
48bdc5a62SPatrick Kelsey  * distributions retain the above copyright notice and this paragraph
58bdc5a62SPatrick Kelsey  * in its entirety, and (2) distributions including binary code include
68bdc5a62SPatrick Kelsey  * the above copyright notice and this paragraph in its entirety in
78bdc5a62SPatrick Kelsey  * the documentation or other materials provided with the distribution.
88bdc5a62SPatrick Kelsey  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
98bdc5a62SPatrick Kelsey  * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
108bdc5a62SPatrick Kelsey  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
118bdc5a62SPatrick Kelsey  * FOR A PARTICULAR PURPOSE.
128bdc5a62SPatrick Kelsey  */
138bdc5a62SPatrick Kelsey 
143340d773SGleb Smirnoff /* \summary: Real Time Streaming Protocol (RTSP) printer */
158bdc5a62SPatrick Kelsey 
16*ee67461eSJoseph Mingrone #include <config.h>
178bdc5a62SPatrick Kelsey 
18*ee67461eSJoseph Mingrone #include "netdissect-stdinc.h"
198bdc5a62SPatrick Kelsey 
203340d773SGleb Smirnoff #include "netdissect.h"
218bdc5a62SPatrick Kelsey 
228bdc5a62SPatrick Kelsey static const char *rtspcmds[] = {
238bdc5a62SPatrick Kelsey 	"DESCRIBE",
248bdc5a62SPatrick Kelsey 	"ANNOUNCE",
258bdc5a62SPatrick Kelsey 	"GET_PARAMETER",
268bdc5a62SPatrick Kelsey 	"OPTIONS",
278bdc5a62SPatrick Kelsey 	"PAUSE",
288bdc5a62SPatrick Kelsey 	"PLAY",
298bdc5a62SPatrick Kelsey 	"RECORD",
308bdc5a62SPatrick Kelsey 	"REDIRECT",
318bdc5a62SPatrick Kelsey 	"SETUP",
328bdc5a62SPatrick Kelsey 	"SET_PARAMETER",
338bdc5a62SPatrick Kelsey 	"TEARDOWN",
348bdc5a62SPatrick Kelsey 	NULL
358bdc5a62SPatrick Kelsey };
368bdc5a62SPatrick Kelsey 
378bdc5a62SPatrick Kelsey void
rtsp_print(netdissect_options * ndo,const u_char * pptr,u_int len)388bdc5a62SPatrick Kelsey rtsp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
398bdc5a62SPatrick Kelsey {
40*ee67461eSJoseph Mingrone 	ndo->ndo_protocol = "rtsp";
41*ee67461eSJoseph Mingrone 	txtproto_print(ndo, pptr, len, rtspcmds, RESP_CODE_SECOND_TOKEN);
428bdc5a62SPatrick Kelsey }
43