Re: Port binding under linux in ASM



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


.



Relevant Pages

  • Re: No Limit Tourneys, what a joke. No wonder these players win:)
    ... the best way to play this game is pot limit. ... players of the world are the best players. ... stack doesn't get too big. ...
    (rec.gambling.poker)
  • Re: PL or NL GCA
    ... best chance of winning should only be done in one manner - Pot Limit. ... WSOP came into play. ... The Pot Limit players of the world are the best ... have limited success - as long as their stack doesn't get too big. ...
    (rec.gambling.poker)
  • Re: PL or NL GCA
    ... best chance of winning should only be done in one manner - Pot Limit. ... WSOP came into play. ... The Pot Limit players of the world are the best ... have limited success - as long as their stack doesn't get too big. ...
    (rec.gambling.poker)
  • How they stack up in eyes of Patriots
    ... This ranking system is used by NFL teams to slot players so they know who ... every NFL team has done its stack for this weekend's draft. ... there when the Pats select. ...
    (alt.sports.football.pro.ne-patriots)
  • Re: Sit and Go strategies
    ... end up with a smaller stack when it gets down to 3-4 players, ... one often ends up with a small stack and gets gobbled up. ... are the hands that win the huge pots. ... and Gos approximate to heads-up, especially if all fold to you as SB, ...
    (rec.gambling.poker)