P1sec / pysctp

SCTP stack for Python
http://www.p1sec.com
161 stars 67 forks source link

sctp ppid value error #24

Closed amitranjan0220 closed 5 years ago

amitranjan0220 commented 5 years ago

For sctp s1ap protocol ppid should be 8.While giving sctp_send(msg,ppid=8),Whireshark shows 301989888 and putting ppid = 301989888 , it shows ppid=8.

p1-bmu commented 5 years ago

The Linux SCTP API requires the user to pass the PPID with a network byte order. Just do this:

from socket import htonl sctp_send(msg, htonl(ppid))

p1-bmu commented 5 years ago

Forgot to say, for S1AP, PPID is 18, not 8.

amitranjan0220 commented 5 years ago

Sorry for the typo ...and thanks for the help.