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, Inc.
51 + Redistribution and use in source and binary forms, with or without
52 + modification, are permitted provided that the following conditions
55 + 1. Redistributions of source code must retain the above copyright
56 + notice, this list of conditions and the following disclaimer.
57 + 2. Redistributions in binary form must reproduce the above copyright
58 + notice, this list of conditions and the following disclaimer in
59 + the documentation and/or other materials provided with the
61 + 3. The names of the authors may not be used to endorse or promote
62 + products derived from this software without specific prior
65 + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
66 + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
67 + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
77 +#include "interface.h"
78 +#include "../../include/openflow/openflow.h"
79 +#include "../../lib/ofp-print.h"
82 +openflow_print(const u_char *sp, u_int length)
84 + const struct ofp_header *ofp = (struct ofp_header *)sp;
86 + if (!TTEST2(*sp, ntohs(ofp->length)))
89 + ofp_print(stdout, sp, length, vflag);
93 + printf("[|openflow]");
95 --- tcpdump/print-tcp.c 2006-09-19 12:07:57.000000000 -0700
96 +++ tcpdump/print-tcp.c 2009-05-11 15:38:25.000000000 -0700
101 +#include "../../include/openflow/openflow.h"
103 #ifdef HAVE_LIBCRYPTO
104 #include <openssl/md5.h>
108 else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
109 ldp_print(bp, length);
111 + } else if (sport == OFP_TCP_PORT || dport == OFP_TCP_PORT)
112 + openflow_print(bp, length);