Re: Port binding under linux in ASM
- From: Chuck Crayne <ccrayne@xxxxxxxxxx>
- Date: Sun, 20 Apr 2008 13:07:58 -0700
On Sun, 20 Apr 2008 07:52:58 GMT
Frank Kotler <fbkotler@xxxxxxxxxxx> wrote:
This example shows memory for the parameter structure allocated in
static memory... "sparms rd 6"... that's in ".bss" I guess? Could go
on the stack, as "tin cans and string" suspected...
If the program has only one connection to manage, then the socketcall
parameters could indeed go on the stack. However, the example is taken
from a multiplayer game server which multitasks the players using
the connect system call. As each player has his own stack, it makes
more sense for the communications manager to use global variables.
And yes, there are socket calls which use more than three parameters,
as for example:
mov eax,[ebx+pinfd] ;socket file descriptor
mov [p0],eax ;socket file descriptor
mov [p1],ecx ;receive buffer
mov [p2],edx ;length of buffer
mov [p3],0 ;no flags
mov eax,__NR_socketcall
mov ebx,SYS_RECV
mov ecx,sparms
syscall
--
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
- Re: Port binding under linux in ASM
- From: tin . cans . and . string
- Re: 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: Frank Kotler
- 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):
Relevant Pages
|