Package: netexpect
Version: 0.20-3
Followup-For: Bug #714535
User: [email protected]
Usertags: origin-ubuntu saucy ubuntu-patch
In Ubuntu, I've applied the following naive patch to port to the
wireshark 1.10 API. It looks like the _set_unset calls can probably
just go away, as they're setting members that no longer exist.
As for the frame_data_{reset,destroy} mangling, I made a best-effort
guess as to which to use in which situation, but input from someone
more familiar with the source would probably not be a bad plan.
* fix-libwireshark110-build.patch: Track wireshark 1.10 API (closes: #714535)
Thanks for considering the patch.
... Adam
-- System Information:
Debian Release: wheezy/sid
APT prefers saucy-updates
APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.10.0-2-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru netexpect-0.20/debian/changelog netexpect-0.20/debian/changelog
diff -Nru netexpect-0.20/debian/patches/fix-libwireshark110-build.patch netexpect-0.20/debian/patches/fix-libwireshark110-build.patch
--- netexpect-0.20/debian/patches/fix-libwireshark110-build.patch 1969-12-31 17:00:00.000000000 -0700
+++ netexpect-0.20/debian/patches/fix-libwireshark110-build.patch 2013-07-05 13:08:32.000000000 -0600
@@ -0,0 +1,110 @@
+Description: Track API changes in wireshark 1.10
+Author: Adam Conrad <[email protected]>
+Bug-Debian: http://bugs.debian.org/714535
+Last-Update: 2013-07-05
+
+--- netexpect-0.20.orig/src/expect_network.c
++++ netexpect-0.20/src/expect_network.c
+@@ -167,7 +167,7 @@ process_packet(u_char *user, const struc
+ hd->passed_rfilter = pkt_dissect_tcl(hd->interp, bytes, &fdata, rfcode,
+ ns_name, 1);
+
+- frame_data_cleanup(&fdata);
++ frame_data_destroy(&fdata);
+
+ /*
+ * We rely on the current time in some operations (when reading packets
+--- netexpect-0.20.orig/src/tcl_packet.c
++++ netexpect-0.20/src/tcl_packet.c
+@@ -134,8 +134,6 @@ fill_in_framedata(frame_data *fdata, con
+ frame_data_init(fdata, 0 /* num */, &phdr, 0 /* offset */, 0 /* cum_bytes */);
+
+ nstime_set_unset(&fdata->rel_ts);
+- nstime_set_unset(&fdata->del_cap_ts);
+- nstime_set_unset(&fdata->del_dis_ts);
+ }
+
+ static
+@@ -381,7 +379,7 @@ update_string(Tcl_Obj *packet_obj)
+ packet_obj->length = len;
+
+ epan_dissect_free(edt);
+- frame_data_cleanup(&fdata);
++ frame_data_destroy(&fdata);
+ }
+
+ static void
+@@ -505,7 +503,7 @@ tcl_packet_dissect(Tcl_Interp *interp, i
+
+ pkt_dissect_tcl(interp, packet->bytes.data, &fdata, NULL, ns_name, 1);
+
+- frame_data_cleanup(&fdata);
++ frame_data_destroy(&fdata);
+
+ return TCL_OK;
+ }
+@@ -786,7 +784,7 @@ tcl_packet_show(Tcl_Interp *interp, int
+
+ pkt_dissect_show(packet->bytes.data, &fdata, verbose);
+
+- frame_data_cleanup(&fdata);
++ frame_data_destroy(&fdata);
+
+ return TCL_OK;
+ }
+--- netexpect-0.20.orig/src/send_expect.c
++++ netexpect-0.20/src/send_expect.c
+@@ -273,8 +273,6 @@ fill_in_framedata(frame_data *fdata, con
+ frame_data_init(fdata, 0 /* num */, &phdr, 0 /* offset */, 0 /* cum_bytes */);
+
+ nstime_set_unset(&fdata->rel_ts);
+- nstime_set_unset(&fdata->del_cap_ts);
+- nstime_set_unset(&fdata->del_dis_ts);
+ }
+
+ /*
+@@ -317,7 +315,7 @@ build_and_hash(Tcl_Interp *interp, struc
+
+ packets[n].hash = pkt_hash(interp, packets[n].packet.data, &fdata);
+
+- frame_data_cleanup(&fdata);
++ frame_data_destroy(&fdata);
+
+ #ifdef DEBUG
+ printf("sent pkt len = %u, packet data:\n", packets[n].packet.len);
+@@ -704,7 +702,7 @@ bypass_select:
+
+ hash = pkt_hash(interp, pkt_data, &rcvd_fdata);
+
+- frame_data_cleanup(&rcvd_fdata);
++ frame_data_reset(&rcvd_fdata);
+
+ #ifdef DEBUG
+ printf("recv'ed pkt len = %u, packet data:\n", pkthdr.len);
+@@ -795,7 +793,7 @@ bypass_select:
+ sent_packets[j].packet.data,
+ &sent_fdata);
+
+- frame_data_cleanup(&sent_fdata);
++ frame_data_reset(&sent_fdata);
+
+ if (!isanswer)
+ /*
+@@ -1226,7 +1224,7 @@ NExp_SendExpectObjCmd(ClientData clientD
+
+ hash = pkt_hash(interp, pkt_data, &rcvd_fdata);
+
+- frame_data_cleanup(&rcvd_fdata);
++ frame_data_reset(&rcvd_fdata);
+
+ #ifdef DEBUG
+ printf("recv'ed pkt len = %u, packet data:\n", pkthdr.len);
+@@ -1317,7 +1315,7 @@ NExp_SendExpectObjCmd(ClientData clientD
+ sent_packets[j].packet.data,
+ &sent_fdata);
+
+- frame_data_cleanup(&sent_fdata);
++ frame_data_reset(&sent_fdata);
+
+ if (!isanswer)
+ /*
diff -Nru netexpect-0.20/debian/patches/series netexpect-0.20/debian/patches/series
--- netexpect-0.20/debian/patches/series 2012-06-13 16:25:29.000000000 -0600
+++ netexpect-0.20/debian/patches/series 2013-07-05 13:05:53.000000000 -0600
@@ -0,0 +1 @@
+fix-libwireshark110-build.patch