aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-06-24 22:46:07 -0700
committerGuy Harris <gharris@sonic.net>2023-06-24 22:46:07 -0700
commitebc1a6fa9e77780772fc84659292ff41b4bad087 (patch)
tree38f54f3ab941e998be85f2d4e46e449f9c11772e
parentaac4058d2625b243fdba7f0c3e134493f1c68b88 (diff)
haiku: no need to supply a list of DLT_s.
If you have only one DLT_ per interface, you don't need to construct a list containing that DLT_; pcap_list_datalinks() will construct a one-element list containing that DLT_ and provide it to the caller.
-rw-r--r--pcap-hurd.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/pcap-hurd.c b/pcap-hurd.c
index e7dc756a..6eaeb346 100644
--- a/pcap-hurd.c
+++ b/pcap-hurd.c
@@ -201,9 +201,6 @@ pcap_activate_hurd(pcap_t *p)
goto error;
}
- /* XXX Ethernet only currently */
- p->linktype = DLT_EN10MB;
-
p->bufsize = sizeof(struct net_rcv_msg);
p->buffer = malloc(p->bufsize);
@@ -213,10 +210,23 @@ pcap_activate_hurd(pcap_t *p)
goto error;
}
- p->dlt_list = malloc(sizeof(*p->dlt_list));
-
- if (p->dlt_list != NULL)
- *p->dlt_list = DLT_EN10MB;
+ /*
+ * XXX Ethernet only currently
+ *
+ * XXX - does "Ethernet only currently" mean "the only devices
+ * on which the Hurd supports packet capture are Ethernet
+ * devices", or "it supports other devices but makes them
+ * all provide Ethernet headers"?
+ *
+ * If the latter, is there a way to determine whether the
+ * device is a real Ethernet, so that we could offer DLT_DOCSIS,
+ * in case you're capturing DOCSIS traffic that a Cisco Cable
+ * Modem Termination System is putting out onto an Ethernet
+ * (it doesn't put an Ethernet header onto the wire, it puts
+ * raw DOCSIS frames out on the wire inside the low-level
+ * Ethernet framing)?
+ */
+ p->linktype = DLT_EN10MB;
p->read_op = pcap_read_hurd;
p->inject_op = pcap_inject_hurd;