1 --- tcpdump/interface.h 2007-06-13 18:03:20.000000000 -0700
2 +++ tcpdump/interface.h 2008-04-15 18:28:55.000000000 -0700
5 extern const char *dnaddr_string(u_short);
7 -extern void error(const char *, ...)
8 +#define error(fmt, args...) tcpdump_error(fmt, ## args)
9 +extern void tcpdump_error(const char *, ...)
10 __attribute__((noreturn, format (printf, 1, 2)));
11 extern void warning(const char *, ...) __attribute__ ((format (printf, 1, 2)));
14 extern void hex_print_with_offset(const char *, const u_char *, u_int, u_int);
15 extern void hex_print(const char *, const u_char *, u_int);
16 extern void telnet_print(const u_char *, u_int);
17 +extern void openflow_print(const u_char *, u_int);
18 extern int ether_encap_print(u_short, const u_char *, u_int, u_int, u_short *);
19 extern int llc_print(const u_char *, u_int, u_int, const u_char *,
20 const u_char *, u_short *);
21 --- tcpdump/Makefile.in 2007-09-25 18:59:52.000000000 -0700
22 +++ tcpdump/Makefile.in 2009-05-11 15:59:28.000000000 -0700
24 CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
28 +LDFLAGS = @LDFLAGS@ -L../../lib
32 +LIBS = @LIBS@ -lopenvswitch
35 INSTALL_PROGRAM = @INSTALL_PROGRAM@
37 print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
38 print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
39 print-timed.c print-token.c print-udp.c print-vjc.c print-vrrp.c \
40 - print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c
41 + print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c \
46 --- tcpdump/print-openflow.c 1969-12-31 16:00:00.000000000 -0800
47 +++ tcpdump/print-openflow.c 2009-05-11 15:38:41.000000000 -0700
49 +/* Copyright (C) 2007, 2008, 2009 Nicira Networks.
51 + * Permission to use, copy, modify, and/or distribute this software for any
52 + * purpose with or without fee is hereby granted, provided that the above
53 + * copyright notice and this permission notice appear in all copies.
55 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
56 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
57 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
58 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
59 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
60 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
61 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
71 +#include "interface.h"
72 +#include "../../include/openflow/openflow.h"
73 +#include "../../lib/ofp-print.h"
76 +openflow_print(const u_char *sp, u_int length)
78 + const struct ofp_header *ofp = (struct ofp_header *)sp;
80 + if (!TTEST2(*sp, ntohs(ofp->length)))
83 + ofp_print(stdout, sp, length, vflag);
87 + printf("[|openflow]");
89 --- tcpdump/print-tcp.c 2006-09-19 12:07:57.000000000 -0700
90 +++ tcpdump/print-tcp.c 2009-05-11 15:38:25.000000000 -0700
95 +#include "../../include/openflow/openflow.h"
98 #include <openssl/md5.h>
102 else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
103 ldp_print(bp, length);
105 + } else if (sport == OFP_TCP_PORT || dport == OFP_TCP_PORT)
106 + openflow_print(bp, length);