aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-11-29 20:26:17 -0800
committerGuy Harris <guy@alum.mit.edu>2019-11-29 20:26:17 -0800
commitd3ab41238ab9bac476f93c56cf42c91ac160158d (patch)
treec2c3f73d83e298bd96fc7169c450c2c72e4d771a /pcap-linux.c
parentb7fa331a02fdb605b49130b76480574ba6fbb4fc (diff)
Rename activate_sock() to activate_pf_packet().
That's the code path for activating a PF_PACKET socket.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 4573dd33..7e4404bf 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -235,7 +235,7 @@ static int get_if_flags(const char *, bpf_u_int32 *, char *);
static int is_wifi(int, const char *);
static void map_arphrd_to_dlt(pcap_t *, int, int, const char *, int);
static int pcap_activate_linux(pcap_t *);
-static int activate_sock(pcap_t *, int);
+static int activate_pf_packet(pcap_t *, int);
static int setup_non_mmapped(pcap_t *);
#ifdef HAVE_PACKET_RING
static int setup_mmapped(pcap_t *, int *);
@@ -1461,7 +1461,7 @@ pcap_activate_linux(pcap_t *handle)
* If the "any" device is specified, try to open a SOCK_DGRAM.
* Otherwise, open a SOCK_RAW.
*/
- ret = activate_sock(handle, is_any_device);
+ ret = activate_pf_packet(handle, is_any_device);
if (ret < 0) {
/*
* Fatal error; the return value is the error code,
@@ -2711,7 +2711,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int sock_fd, int arptype,
* XXX - are there any other sorts of "fake Ethernet" that
* have ARPHRD_ETHER but that shouldn't offer DLT_DOCSIS as
* a Cisco CMTS won't put traffic onto it or get traffic
- * bridged onto it? ISDN is handled in "activate_sock()",
+ * bridged onto it? ISDN is handled in "activate_pf_packet()",
* as we fall back on cooked mode there, and we use
* is_wifi() to check for 802.11 devices; are there any
* others?
@@ -3067,7 +3067,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int sock_fd, int arptype,
/* We need to save packet direction for IrDA decoding,
* so let's use "Linux-cooked" mode. Jean II
*
- * XXX - this is handled in activate_sock(). */
+ * XXX - this is handled in activate_pf_packet(). */
/* handlep->cooked = 1; */
break;
@@ -3109,7 +3109,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int sock_fd, int arptype,
* pick up the netlink protocol type such as NETLINK_ROUTE,
* NETLINK_GENERIC, NETLINK_FIB_LOOKUP, etc.
*
- * XXX - this is handled in activate_sock().
+ * XXX - this is handled in activate_pf_packet().
*/
/* handlep->cooked = 1; */
break;
@@ -3171,7 +3171,7 @@ set_dlt_list_cooked(pcap_t *handle _U_, int sock_fd _U_)
* Returns 0 on success and a PCAP_ERROR_ value on failure.
*/
static int
-activate_sock(pcap_t *handle, int is_any_device)
+activate_pf_packet(pcap_t *handle, int is_any_device)
{
struct pcap_linux *handlep = handle->priv;
const char *device = handle->opt.device;
@@ -3615,7 +3615,7 @@ setup_mmapped(pcap_t *handle, int *status)
* warnings or to a PCAP_WARNING_ value if there is a warning.
*
* Override some defaults and inherit the other fields from
- * activate_sock.
+ * activate_pf_packet().
* handle->offset is used to get the current position into the rx ring.
* handle->cc is used to store the ring size.
*/