1285191Spkelsey/*
2285191Spkelsey * Redistribution and use in source and binary forms, with or without
3285191Spkelsey * modification, are permitted provided that: (1) source code
4285191Spkelsey * distributions retain the above copyright notice and this paragraph
5285191Spkelsey * in its entirety, and (2) distributions including binary code include
6285191Spkelsey * the above copyright notice and this paragraph in its entirety in
7285191Spkelsey * the documentation or other materials provided with the distribution.
8285191Spkelsey * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
9285191Spkelsey * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
10285191Spkelsey * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11285191Spkelsey * FOR A PARTICULAR PURPOSE.
12285191Spkelsey */
13285191Spkelsey
14285191Spkelsey#ifndef lint
15285191Spkelseystatic const char rcsid[] _U_ =
16285191Spkelsey    "@(#) $Header$";
17285191Spkelsey#endif
18285191Spkelsey
19285191Spkelsey#ifdef HAVE_CONFIG_H
20285191Spkelsey#include "config.h"
21285191Spkelsey#endif
22285191Spkelsey
23285191Spkelsey#include <tcpdump-stdinc.h>
24285191Spkelsey
25285191Spkelsey#include <stdio.h>
26285191Spkelsey#include <stdlib.h>
27285191Spkelsey
28285191Spkelsey#include "interface.h"
29285191Spkelsey#include "extract.h"
30285191Spkelsey
31285191Spkelsey/*
32285191Spkelsey * Includes WebDAV requests.
33285191Spkelsey */
34285191Spkelseystatic const char *httpcmds[] = {
35285191Spkelsey	"GET",
36285191Spkelsey	"PUT",
37285191Spkelsey	"COPY",
38285191Spkelsey	"HEAD",
39285191Spkelsey	"LOCK",
40285191Spkelsey	"MOVE",
41285191Spkelsey	"POLL",
42285191Spkelsey	"POST",
43285191Spkelsey	"BCOPY",
44285191Spkelsey	"BMOVE",
45285191Spkelsey	"MKCOL",
46285191Spkelsey	"TRACE",
47285191Spkelsey	"LABEL",
48285191Spkelsey	"MERGE",
49285191Spkelsey	"DELETE",
50285191Spkelsey	"SEARCH",
51285191Spkelsey	"UNLOCK",
52285191Spkelsey	"REPORT",
53285191Spkelsey	"UPDATE",
54285191Spkelsey	"NOTIFY",
55285191Spkelsey	"BDELETE",
56285191Spkelsey	"CONNECT",
57285191Spkelsey	"OPTIONS",
58285191Spkelsey	"CHECKIN",
59285191Spkelsey	"PROPFIND",
60285191Spkelsey	"CHECKOUT",
61285191Spkelsey	"CCM_POST",
62285191Spkelsey	"SUBSCRIBE",
63285191Spkelsey	"PROPPATCH",
64285191Spkelsey	"BPROPFIND",
65285191Spkelsey	"BPROPPATCH",
66285191Spkelsey	"UNCHECKOUT",
67285191Spkelsey	"MKACTIVITY",
68285191Spkelsey	"MKWORKSPACE",
69285191Spkelsey	"UNSUBSCRIBE",
70285191Spkelsey	"RPC_CONNECT",
71285191Spkelsey	"VERSION-CONTROL",
72285191Spkelsey	"BASELINE-CONTROL",
73285191Spkelsey	NULL
74285191Spkelsey};
75285191Spkelsey
76285191Spkelseyvoid
77285191Spkelseyhttp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
78285191Spkelsey{
79285191Spkelsey	txtproto_print(ndo, pptr, len, "http", httpcmds, RESP_CODE_SECOND_TOKEN);
80285191Spkelsey}
81