How do you send packets in ASM?
I was wondering if there was a way in ASM to send TCP/IP packets, equivalent to send, recv, sendto and recvfrom in C++.
|
Yes, but you'll need to call send, recv etc. Directly - no (you need to use OS functions for such operations).
|
system call list: http://world.std.com/~slanning/asm/syscall_list.html
btw. you may have to use file functions to access the sockets, I have no clue how to do this tho. example function: Code:
xorl %eax, %eax # %eax = 0 |
To use library functions you can use the call instruction:
call socket but first you need to put the right argiments to the stack (in the right order). |
what mara is trying to say it, you'll have to link to libc, or you could implement your own functions (very unlikeyly)
|
All times are GMT -5. The time now is 10:57 PM. |