aboutsummaryrefslogtreecommitdiff
path: root/pcap-tc.c
diff options
context:
space:
mode:
authorGisle Vanem <gisle.vanem@gmail.com>2018-12-05 15:47:59 -0800
committerGuy Harris <guy@alum.mit.edu>2018-12-05 15:48:27 -0800
commit0936b8b515631e4fc08f67598d325c2d180f5d7b (patch)
tree90203c5625204a3cb9023302f19f251698003d44 /pcap-tc.c
parent8879aa1b58496ed4af3eb581c92d34fd80e4c6ae (diff)
Fix compile errors.
Should fix GitHub issue #764.
Diffstat (limited to 'pcap-tc.c')
-rw-r--r--pcap-tc.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/pcap-tc.c b/pcap-tc.c
index a1f58911..b4a5593f 100644
--- a/pcap-tc.c
+++ b/pcap-tc.c
@@ -123,7 +123,7 @@ static int TcSetDatalink(pcap_t *p, int dlt);
static int TcGetNonBlock(pcap_t *p);
static int TcSetNonBlock(pcap_t *p, int nonblock);
static void TcCleanup(pcap_t *p);
-static int TcInject(pcap_t *p, const void *buf, size_t size);
+static int TcInject(pcap_t *p, const void *buf, int size);
static int TcRead(pcap_t *p, int cnt, pcap_handler callback, u_char *user);
static int TcStats(pcap_t *p, struct pcap_stat *ps);
static int TcSetFilter(pcap_t *p, struct bpf_program *fp);
@@ -440,7 +440,7 @@ TcFindAllDevs(pcap_if_list_t *devlist, char *errbuf)
PTC_PORT pPorts = NULL;
TC_STATUS status;
int result = 0;
- pcap_if_t *dev, *cursor;
+ pcap_if_t *dev;
ULONG i;
do
@@ -472,22 +472,7 @@ TcFindAllDevs(pcap_if_list_t *devlist, char *errbuf)
dev = TcCreatePcapIfFromPort(pPorts[i]);
if (dev != NULL)
- {
- /*
- * append it at the end
- */
- if (devlistp->beginning == NULL)
- {
- devlistp->beginning = dev;
- }
- else
- {
- for (cursor = devlistp->beginning;
- cursor->next != NULL;
- cursor = cursor->next);
- cursor->next = dev;
- }
- }
+ add_dev(devlist, dev->name, dev->flags, dev->description, errbuf);
}
if (numPorts > 0)
@@ -846,7 +831,7 @@ static void TcCleanup(pcap_t *p)
}
/* Send a packet to the network */
-static int TcInject(pcap_t *p, const void *buf, size_t size)
+static int TcInject(pcap_t *p, const void *buf, int size)
{
struct pcap_tc *pt = p->priv;
TC_STATUS status;