OpenFastPath / ofp

OpenFastPath project
BSD 3-Clause "New" or "Revised" License
349 stars 126 forks source link

ofp_sendto should return the number of bytes sent #250

Open gabeblack opened 4 years ago

gabeblack commented 4 years ago

It appears that ofp_send/sendto returns 0 if the packet is sent. This diverges from the normal socket send/sendto calls in that they return the number of bytes sent. Not sure if that is intentional or not as the apis don't seem to be documented as to what they supposed to return. However, given that there is netwrap stuff, it seems like it is intended to mimic the same api.

bogdanPricope commented 4 years ago

Hi, I guess it was a UDP socket. Take a look at PR#251 ("udp: fix ofp_send/ofp_sendto return value on success").