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 @@ -363,7 +364,7 @@ all: $(PROG)
59 - $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
60 + libtool --mode=link $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
62 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
64 --- tcpdump/print-openflow.c 1969-12-31 16:00:00.000000000 -0800
65 +++ tcpdump/print-openflow.c 2009-05-11 15:38:41.000000000 -0700
67 +/* Copyright (C) 2007, 2008, 2009 Nicira, Inc.
69 + Redistribution and use in source and binary forms, with or without
70 + modification, are permitted provided that the following conditions
73 + 1. Redistributions of source code must retain the above copyright
74 + notice, this list of conditions and the following disclaimer.
75 + 2. Redistributions in binary form must reproduce the above copyright
76 + notice, this list of conditions and the following disclaimer in
77 + the documentation and/or other materials provided with the
79 + 3. The names of the authors may not be used to endorse or promote
80 + products derived from this software without specific prior
83 + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
84 + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
85 + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
94 +#include "interface.h"
95 +#include "openflow/openflow.h"
96 +#include "../../lib/ofp-print.h"
99 +openflow_print(const u_char *sp, u_int length)
101 + const struct ofp_header *ofp = (struct ofp_header *)sp;
103 + if (!TTEST2(*sp, ntohs(ofp->length)))
106 + ofp_print(stdout, sp, length, vflag);
110 + printf("[|openflow]");
112 --- tcpdump/print-tcp.c 2006-09-19 12:07:57.000000000 -0700
113 +++ tcpdump/print-tcp.c 2009-05-11 15:38:25.000000000 -0700
118 +#include "openflow/openflow.h"
120 #ifdef HAVE_LIBCRYPTO
121 #include <openssl/md5.h>
122 #include <signature.h>
125 else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
126 ldp_print(bp, length);
128 + } else if (sport == OFP_OLD_PORT || dport == OFP_OLD_PORT) {
129 + openflow_print(bp, length);