flat assembler
Message board for the users of flat assembler.

Index > Linux > Syscall numbers for recv and send functions?

Author
Thread Post new topic Reply to topic
rbprsp



Joined: 14 Nov 2014
Posts: 6
rbprsp
I'm using https://filippo.io/linux-syscall-table/ Linux syscalls reference, but can't found recv and send functions here. What's syscall numbers for these functions?
Post 08 Mar 2015, 00:58
View user's profile Send private message Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens
rbprsp wrote:
I'm using https://filippo.io/linux-syscall-table/ Linux syscalls reference, but can't found recv and send functions here. What's syscall numbers for these functions?

recvfrom() and sendto() ?
64bit are right there
32bit are right here http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html

bdw if you need 64bit ones, i got a .inc for it, just ask
Post 08 Mar 2015, 04:07
View user's profile Send private message Reply with quote
RIxRIpt



Joined: 18 Apr 2013
Posts: 50
RIxRIpt
rbprsp, afaik if you don't need to specify flags (in recv/send) calls, you can use read/write calls.

gens, can recvfrom/sendto be used for TCP sockets (like recv/send)? Aren't they UDP only?
Post 08 Mar 2015, 10:55
View user's profile Send private message Visit poster's website Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens
RIxRIpt wrote:
gens, can recvfrom/sendto be used for TCP sockets (like recv/send)? Aren't they UDP only?

it seems to be documented like that
i didnt know that

there is no syscall number for it, so i did a little digging
"The recv() call is normally used only on a connected socket (see connect(2)) and is identical to recvfrom() with a NULL from parameter."

so i guess it's recvfrom() with last two parameters being null
(or just the "from", as then "fromlen" wouldnt be checked anyway)
Post 08 Mar 2015, 13:15
View user's profile Send private message Reply with quote
rbprsp



Joined: 14 Nov 2014
Posts: 6
rbprsp
Thanks, dear colleagues! I'll publish my syscall tests at this thread later.

Sorry for offtopic, but can anyone explain how to convert FAS symbols to gdb format?
Post 08 Mar 2015, 22:28
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.