-
Notifications
You must be signed in to change notification settings - Fork 270
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
Captured Packet.Data.Length and udpPacket.PayloadData.Length threshold? #280
Comments
What do you mean by KO vs OK?
…On Fri, May 7, 2021 at 12:56 PM charleslales ***@***.***> wrote:
Hi,
I'm currently facing an issue when capturing packet..
It does happen with a first app using
_sendSocket = new Socket(_ep.AddressFamily, SocketType.Dgram,
ProtocolType.Udp);
_sendSocket.SendTo(message, msgLen, SocketFlags.None, ep);
but not with another test app using
_UdpClient = new UdpClient(port);
_UdpClient.Send(data, data.Length, ipe);
Capture code is samples one to get UDP info:
Device_OnPacketArrival(object o, CaptureEventArgs e)
var packet = PacketDotNet.Packet.ParsePacket(e.Packet.LinkLayerType,
e.Packet.Data);
var udpPacket = packet.Extract<PacketDotNet.UdpPacket>();
first app:
114 obj -> 1472 bytes KO why???
113 obj -> 1472 bytes KO why???
112 obj -> 1463 bytes OK
test app:
114 obj -> 1489 bytes OK
113 obj -> 1476 bytes OK
112 obj -> 1463 bytes OK
Sorry if it is basic question..
Is there any other option / param I missed smwhere?
Kind regards,
Charles
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#280>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJH4ACZAXPXGA2WYDK5WXDTMQLVDANCNFSM44KSBL6Q>
.
|
Well, to parse properly n obj, I need to get n x 13 + 7 bytes from udpPacket.PayloadData. |
@charleslales You have an MTU of 1500, your network interface can't send an UDP payload larger than |
Thanks for hint, is it IP layer fragmentation of too large UPD packet? |
Loopback devices don't have an MTU limit so the UDP packet can get as big as needed. Performing IP de-fragmentation is one way to solve the issue, |
Ok, thanks for explanation. |
|
Yeah an extension package or an addition to packetnet-connections (although in this case I guess its misnamed since udp is connectionless) would be pretty cool |
Done it... well, let's say implemented what I needed to grab all fragments and build back at the end the udp packets. |
I bet others would be interested. It could be a good addition to
packdotnet-connections if you were interested.
…On Fri, May 14, 2021 at 11:20 AM charleslales ***@***.***> wrote:
Done it... well, let's say implemented what I needed to grab all fragments
and build back at the end the udp packets.
No extension methods with a nice Device_OnReassembledPacketArrival
event... but some concurrent ConcurrentDictionaries to keep it a min thread
safe and straight forward... Work great.
Can post it if you may think it is interesting.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#280 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJH4ABEIXYR7U36PQLQTLLTNU5UPANCNFSM44KSBL6Q>
.
|
Hi, Here it is, not fully functional but hopefully giving already elements to start with.. Let's consider these intermediate concurrent collections...
... and see how to use them
Feel free to comment and especialy suggest some fixes ;-) Kind regards, |
Hi,
I'm currently facing an issue when capturing packet..
It does happen with a first app using
_sendSocket = new Socket(_ep.AddressFamily, SocketType.Dgram, ProtocolType.Udp);
_sendSocket.SendTo(message, msgLen, SocketFlags.None, ep);
but not with another test app using
_UdpClient = new UdpClient(port);
_UdpClient.Send(data, data.Length, ipe);
Capture code is samples one to get UDP info:
Device_OnPacketArrival(object o, CaptureEventArgs e)
var packet = PacketDotNet.Packet.ParsePacket(e.Packet.LinkLayerType, e.Packet.Data);
var udpPacket = packet.Extract<PacketDotNet.UdpPacket>();
first app:
114 obj -> 1472 bytes KO why???
113 obj -> 1472 bytes KO why???
112 obj -> 1463 bytes OK
test app:
114 obj -> 1489 bytes OK
113 obj -> 1476 bytes OK
112 obj -> 1463 bytes OK
Sorry if it is basic question..
Is there any other option / param I missed smwhere?
Kind regards,
Charles
The text was updated successfully, but these errors were encountered: