aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-23 15:30:11 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-23 15:30:11 -0700
commit02a9662eb8c21955873280f328934c1c2e971a09 (patch)
tree3c95467486f67062aad9ecb0ec3e4d6aa2552403 /pcap-linux.c
parent149f83b7ccea0050628ef71b0a60c73cc4f3c89e (diff)
Use a bit less generic name than "map".
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index daded9a7..7844ce5c 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -5456,12 +5456,12 @@ enter_rfmon_mode(pcap_t *handle, int sock_fd, const char *device)
static const struct {
int soft_timestamping_val;
int pcap_tstamp_val;
-} map[3] = {
+} sof_ts_type_map[3] = {
{ SOF_TIMESTAMPING_SOFTWARE, PCAP_TSTAMP_HOST },
{ SOF_TIMESTAMPING_SYS_HARDWARE, PCAP_TSTAMP_ADAPTER },
{ SOF_TIMESTAMPING_RAW_HARDWARE, PCAP_TSTAMP_ADAPTER_UNSYNCED }
};
-#define NUM_SOF_TIMESTAMPING_TYPES (sizeof map / sizeof map[0])
+#define NUM_SOF_TIMESTAMPING_TYPES (sizeof sof_ts_type_map / sizeof sof_ts_type_map[0])
#ifdef ETHTOOL_GET_TS_INFO
/*
@@ -5509,15 +5509,15 @@ iface_ethtool_get_ts_info(pcap_t *handle, char *ebuf)
num_ts_types = 0;
for (i = 0; i < NUM_SOF_TIMESTAMPING_TYPES; i++) {
- if (info.so_timestamping & map[i].soft_timestamping_val)
+ if (info.so_timestamping & sof_ts_type_map[i].soft_timestamping_val)
num_ts_types++;
}
handle->tstamp_type_count = num_ts_types;
if (num_ts_types != 0) {
handle->tstamp_type_list = malloc(num_ts_types * sizeof(u_int));
for (i = 0, j = 0; i < NUM_SOF_TIMESTAMPING_TYPES; i++) {
- if (info.so_timestamping & map[i].soft_timestamping_val) {
- handle->tstamp_type_list[j] = map[i].pcap_tstamp_val;
+ if (info.so_timestamping & sof_ts_type_map[i].soft_timestamping_val) {
+ handle->tstamp_type_list[j] = sof_ts_type_map[i].pcap_tstamp_val;
j++;
}
}
@@ -5537,7 +5537,7 @@ iface_ethtool_get_ts_info(pcap_t *handle, char *ebuf _U_)
handle->tstamp_type_count = NUM_SOF_TIMESTAMPING_TYPES;
handle->tstamp_type_list = malloc(NUM_SOF_TIMESTAMPING_TYPES * sizeof(u_int));
for (i = 0, j = 0; i < NUM_SOF_TIMESTAMPING_TYPES; i++)
- handle->tstamp_type_list[i] = map[i].pcap_tstamp_val;
+ handle->tstamp_type_list[i] = sof_ts_type_map[i].pcap_tstamp_val;
return 0;
}
#endif /* ETHTOOL_GET_TS_INFO */