nmap / nmap/npcap

pcap_sendqueue_transmit() return value - sharppcap

Open
#287 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.6k
Forks
592
PR merge metrics
No merged PRs in 30d

Description

Hello.

I'm calling pcap_sendqueue_transmit() with no packets in the queue and seeing 1073741811 returned. I can't figure out the code path in npcap/libpcap that results in this return value. This only occurs for npcap, the test passes on both linux and windows. Using npcap 1.10 in the case where the failure occurs.

I did find PacketSendPackets in pcap-nfp.c but can't find any docs on that function, a google search doesn't turn anything useful up.

If this is a known return value it seems odd, the upper bit isn't set so it doesn't appear to be a negative value. The signatures used for pinvoke look correct.

If I do call pcap_sendqueue_transmit() even with a single packet in the queue I do get the correct value.

You can see the logs from the Azure pipelines issue here, https://dev.azure.com/chmorgan/chmorgan/_build/results?buildId=594&view=logs&j=823afbdf-f891-574b-27d0-2d0231c9608a&t=f870ef66-9f98-5e46-d80f-0a348a0d71b1

Any pointers?

Chris

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pcap_sendqueue_transmit() and the PacketSendPackets path in pcap-nfp.c, then reproduce the empty-queue case with npcap 1.10 and compare it with the one-packet case. Use the linked Azure Pipelines logs to trace the returned value; done means identifying whether 1073741811 is expected and documenting or correcting the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.