xref: /netbsd-src/external/bsd/tcpdump/dist/print-rtsp.c (revision 26ba0b503b498a5194a71ac319838b7f5497f3fe)
13d25ea14Schristos /*
23d25ea14Schristos  * Redistribution and use in source and binary forms, with or without
33d25ea14Schristos  * modification, are permitted provided that: (1) source code
43d25ea14Schristos  * distributions retain the above copyright notice and this paragraph
53d25ea14Schristos  * in its entirety, and (2) distributions including binary code include
63d25ea14Schristos  * the above copyright notice and this paragraph in its entirety in
73d25ea14Schristos  * the documentation or other materials provided with the distribution.
83d25ea14Schristos  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
93d25ea14Schristos  * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
103d25ea14Schristos  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
113d25ea14Schristos  * FOR A PARTICULAR PURPOSE.
123d25ea14Schristos  */
133d25ea14Schristos 
14fdccd7e4Schristos #include <sys/cdefs.h>
15fdccd7e4Schristos #ifndef lint
16*26ba0b50Schristos __RCSID("$NetBSD: print-rtsp.c,v 1.5 2024/09/02 16:15:33 christos Exp $");
17fdccd7e4Schristos #endif
18fdccd7e4Schristos 
19dc860a36Sspz /* \summary: Real Time Streaming Protocol (RTSP) printer */
203d25ea14Schristos 
21c74ad251Schristos #include <config.h>
223d25ea14Schristos 
23c74ad251Schristos #include "netdissect-stdinc.h"
243d25ea14Schristos 
25784088dfSchristos #include "netdissect.h"
263d25ea14Schristos 
273d25ea14Schristos static const char *rtspcmds[] = {
283d25ea14Schristos 	"DESCRIBE",
293d25ea14Schristos 	"ANNOUNCE",
303d25ea14Schristos 	"GET_PARAMETER",
313d25ea14Schristos 	"OPTIONS",
323d25ea14Schristos 	"PAUSE",
333d25ea14Schristos 	"PLAY",
343d25ea14Schristos 	"RECORD",
353d25ea14Schristos 	"REDIRECT",
363d25ea14Schristos 	"SETUP",
373d25ea14Schristos 	"SET_PARAMETER",
383d25ea14Schristos 	"TEARDOWN",
393d25ea14Schristos 	NULL
403d25ea14Schristos };
413d25ea14Schristos 
423d25ea14Schristos void
433d25ea14Schristos rtsp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
443d25ea14Schristos {
45c74ad251Schristos 	ndo->ndo_protocol = "rtsp";
46c74ad251Schristos 	txtproto_print(ndo, pptr, len, rtspcmds, RESP_CODE_SECOND_TOKEN);
473d25ea14Schristos }
48