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 llc_print(const u_char *, u_int, u_int, const u_char *,
19 const u_char *, u_short *);
20 extern int snap_print(const u_char *, u_int, u_int, u_int);
21 --- tcpdump/Makefile.in 2012-06-13 04:56:20.000000000 +1200
22 +++ tcpdump/Makefile.in 2012-08-29 21:36:37.000000000 +1200
27 -INCLS = -I. @V_INCLS@
28 +INCLS = -I. @V_INCLS@ -I../../include
29 DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
33 FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
37 +LDFLAGS = @LDFLAGS@ -L../../lib
41 +LIBS = @LIBS@ -lopenvswitch -lssl -lrt -lm
44 INSTALL_PROGRAM = @INSTALL_PROGRAM@
46 print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
47 print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \
48 print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \
49 - print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c
50 + print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c \
53 LIBNETDISSECT_SRC=print-isakmp.c
54 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
55 --- tcpdump/print-openflow.c 1969-12-31 16:00:00.000000000 -0800
56 +++ tcpdump/print-openflow.c 2009-05-11 15:38:41.000000000 -0700
58 +/* Copyright (C) 2007, 2008, 2009 Nicira, Inc.
60 + Redistribution and use in source and binary forms, with or without
61 + modification, are permitted provided that the following conditions
64 + 1. Redistributions of source code must retain the above copyright
65 + notice, this list of conditions and the following disclaimer.
66 + 2. Redistributions in binary form must reproduce the above copyright
67 + notice, this list of conditions and the following disclaimer in
68 + the documentation and/or other materials provided with the
70 + 3. The names of the authors may not be used to endorse or promote
71 + products derived from this software without specific prior
74 + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
75 + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
76 + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
85 +#include "interface.h"
86 +#include "openflow/openflow.h"
87 +#include "../../lib/ofp-print.h"
90 +openflow_print(const u_char *sp, u_int length)
92 + const struct ofp_header *ofp = (struct ofp_header *)sp;
94 + if (!TTEST2(*sp, ntohs(ofp->length)))
97 + ofp_print(stdout, sp, length, vflag);
101 + printf("[|openflow]");
103 --- tcpdump/print-tcp.c 2006-09-19 12:07:57.000000000 -0700
104 +++ tcpdump/print-tcp.c 2009-05-11 15:38:25.000000000 -0700
109 +#include "openflow/openflow.h"
111 #ifdef HAVE_LIBCRYPTO
112 #include <openssl/md5.h>
113 #include <signature.h>
116 else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
117 ldp_print(bp, length);
119 + } else if (sport == OFP_OLD_PORT || dport == OFP_OLD_PORT) {
120 + openflow_print(bp, length);