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

ppid field changed from 32 bits to 128 bits #48

Closed
CHsixnine opened this issue Jun 23, 2023 · 2 comments
Closed

ppid field changed from 32 bits to 128 bits #48

CHsixnine opened this issue Jun 23, 2023 · 2 comments
Assignees

Comments

@CHsixnine
Copy link

When I set like this below
sctp_send(msg=data, ppid=60)
When I use wireshark parse the package
ppid will become 10^30

image

After that I go directly to the file _sctp.c and set ppid to 0x3c(60)

Py_BEGIN_ALLOW_THREADS
ppid = 0x3c;
size_sent = sctp_sendmsg(fd, msg, msg_len, (struct sockaddr*) psto, sto_len, ppid, 
			flags, stream, ttl, context);

Parsing the package with a wireshark will become like this

image image

ppid should be 32 bits, but it looks like 128 bits

Please help me to solve this problem
Thanks

@p1-bmu
Copy link
Contributor

p1-bmu commented Jun 23, 2023

Maybe if you read carefully the previous issue on PPID, it will provide you with the appropriate answer ?
#46

@p1-bmu p1-bmu self-assigned this Jun 23, 2023
@CHsixnine
Copy link
Author

CHsixnine commented Jun 24, 2023

Thank you very much I have successfully solved this problem.
I successfully solved it after adding the following two lines of code to the sctp.py

68 | from socket import *
1178 | return sctp.sctp_send_msg(self._sk.fileno(), msg, to, ntohl(ppid), flags, stream, timetolive, context)

@p1-bmu p1-bmu closed this as completed Jul 28, 2023
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