Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packetsendpacket failed: A device attached to the system is not functioning.(31) #766

Open
ontheroad530 opened this issue Nov 20, 2024 · 4 comments

Comments

@ontheroad530
Copy link

ontheroad530 commented Nov 20, 2024

Describe the bug
An error occurred in the customer usage scenario, remote debugging:
1.pcap_sendpacket error:
packetsendpacket failed: A device attached to the system is not functioning.(31)
2.I can capture this packet in wireshark still
3.but I can't capture response packet from other device for this packet. I can't do any further debugging...

To Reproduce
I run the test demo (sendpack) and still got the error

Diagnostic information
Npcap 1.79 used, 1.80 used
try Npcap 1.60, no send error,but still can not receive packet from device.
dec40b40ef69c7099d327fa85577e87

Additional context
in other envirment, this work fine.

@guyharris
Copy link
Contributor

packetsendpacket failed: A device attached to the system is not functioning.(31)

31 is ERROR_GEN_FAILURE; I suspect "GEN" stands for "generic", as in "some unspecified thing went wrong".

One NT status value that maps to ERROR_GEN_FAILURE, according to the NTSTATUS to Win32 Error Mappings table, is STATUS_UNSUCCESSFUL. That's returned from the NPF driver in several places.

I can capture this packet in wireshark still

Is Wireshark running on the machine on which you tried sending the packet, or on another machine on the network?

@ontheroad530
Copy link
Author

ontheroad530 commented Nov 21, 2024

packetsendpacket failed: A device attached to the system is not functioning.(31)

31 is ERROR_GEN_FAILURE; I suspect "GEN" stands for "generic", as in "some unspecified thing went wrong".

One NT status value that maps to ERROR_GEN_FAILURE, according to the NTSTATUS to Win32 Error Mappings table, is STATUS_UNSUCCESSFUL. That's returned from the NPF driver in several places.

I can capture this packet in wireshark still

Is Wireshark running on the machine on which you tried sending the packet, or on another machine on the network?

Wireshark was running on the machine I was sending packets from
The error occurred at the remote customer site and I could not debug it further (i.e. can't capture packets on another machine on the network).

@guyharris
Copy link
Contributor

Wireshark was running on the machine I was sending packets from

So the packet was probably being wrapped around by the Npcap code before it tried to send it, but, when it tried to send it, that failed.

It might be easier to debug if, in at least some cases, the Npcap driver returned a status other than STATUS_UNSUCCESSFUL, to indicate a particular error.

@ontheroad530
Copy link
Author

Wireshark was running on the machine I was sending packets from

So the packet was probably being wrapped around by the Npcap code before it tried to send it, but, when it tried to send it, that failed.

It might be easier to debug if, in at least some cases, the Npcap driver returned a status other than STATUS_UNSUCCESSFUL, to indicate a particular error.

thanks, I guess it was not sent success yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants