Re: Port binding under linux in ASM
- From: Chuck Crayne <ccrayne@xxxxxxxxxx>
- Date: Sat, 19 Apr 2008 15:41:50 -0700
On Sat, 19 Apr 2008 14:46:48 -0700 (PDT)
tin.cans.and.string@xxxxxxxxx wrote:
It looks like you've got
an include file performing some constant definitions there - can you
post that as well, please?
As the file is well over 500 lines, I am reluctant to post it in its
entirety, but here are the key definitions:
__NR_socketcall = 102
SYS_SOCKET = 1 ;sys_socket(2)
SYS_BIND = 2 ;sys_bind(2)
SYS_CONNECT = 3 ;sys_connect(2)
SYS_LISTEN = 4 ;sys_listen(2)
SYS_ACCEPT = 5 ;sys_accept(2)
SOCK_STREAM = 1
PF_INET = 2
And the data declarations:
;--------------------------------------------
;network fields & structures
;--------------------------------------------
fd dd 0 ;listening socket fd
paddrl dd 16 ;length of active structure
sin dw PF_INET ;address family
dw 4206h ;port 1602
dd 0 ;INADDR_ANY
dq 0 ;padding
sinl = $-sin
apin dw 0 ;address family
dw 0 ;port
dd 0 ;address
dq 0 ;padding
apinl = $-apin
sparms rd 6 ;sys_socketcall parm list
--
Chuck
http://www.pacificsites.com/~ccrayne/charles.html
.
- References:
- Port binding under linux in ASM
- From: tin . cans . and . string
- Re: Port binding under linux in ASM
- From: Chuck Crayne
- Re: Port binding under linux in ASM
- From: tin . cans . and . string
- Port binding under linux in ASM
- Prev by Date: Re: Port binding under linux in ASM
- Next by Date: Re: Port binding under linux in ASM
- Previous by thread: Re: Port binding under linux in ASM
- Next by thread: Re: Port binding under linux in ASM
- Index(es):