You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have observed that if I set the PPID in SndRcvInfo on SCTPConn.SCTPWrite() to some simple value like 46 (a.i. Diameter according to IANA) from an x86 (little-endian), the on-the-wire PPID (supposed to be BigEndian) has the bytes reversed. So before using, I'd have to do something like (or set it to 0x2e000000, you get the gist):
b := make([]byte, 4)
binary.NativeEndian.PutUint32(b, 46)
sndRcvInfo.ppid = binary.BigEndian.Uint32(b)
I saw that toBuf() uses binary to write the info data. But could it be that instead of using the nativeEndian it should use always the network-byte-order (aka binary.BigEndian), as things should be on the wire? (or maybe toBuf()'s use there is wrong?)
Cheers,
-Dragos
The text was updated successfully, but these errors were encountered:
Hey folks,
I have observed that if I set the PPID in SndRcvInfo on SCTPConn.SCTPWrite() to some simple value like 46 (a.i. Diameter according to IANA) from an x86 (little-endian), the on-the-wire PPID (supposed to be BigEndian) has the bytes reversed. So before using, I'd have to do something like (or set it to 0x2e000000, you get the gist):
I saw that
toBuf()
usesbinary
to write the info data. But could it be that instead of using the nativeEndian it should use always the network-byte-order (aka binary.BigEndian), as things should be on the wire? (or maybetoBuf()
's use there is wrong?)Cheers,
-Dragos
The text was updated successfully, but these errors were encountered: