Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 19:27

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: for sending packet ?
PostPosted: 14 Mar 2008 13:22 

Joined: 14 Mar 2008 13:04
Posts: 1
I have use wsock32.dll proxy dll for blocking unwanted packets on Half-Life server
All ok, but i want to announce on gamers console about it. How better realize it ?
Code:
#define ANNOUNCE "\xff\xff\xff\xfflSERVER PROTECTED !!!";

typedef int (FAR PASCAL*lpfn_recvfrom)(IN SOCKET s, OUT char FAR * buf, IN int len, IN int flags, OUT struct sockaddr FAR *from, IN OUT int FAR * fromlen);
lpfn_recvfrom orig_recvfrom;
int FAR PASCAL sys_recvfrom(IN SOCKET s, OUT char FAR * buf, IN int len, IN int flags, OUT struct sockaddr FAR *from, IN OUT int FAR * fromlen)
{
   int returnCode = (*orig_recvfrom)(s, buf, len, flags, from, fromlen);
   

// Here i have code for hunting unwanted packets
// I want:
// if (packet==blablabla) sendtouserconsole ANNOUNCE

return(returnCode);

}


Can i call winsock sendto function for announce players and how ?
Code:

typedef int (FAR PASCAL*lpfn_sendto)(IN SOCKET s, const char FAR * buf, int len, int flags, const struct sockaddr FAR *to, int tolen);
lpfn_sendto orig_sendto;
int FAR PASCAL sys_sendto(IN SOCKET s, IN const char FAR * buf, IN int len, IN int flags, IN const struct sockaddr FAR *to, IN int tolen)
{

int sendCode = (*orig_sendto)(s, buf, len, flags, to, tolen);
return(sendCode);

}


Top
 Profile  
 
 
 Post subject:
PostPosted: 15 Mar 2008 14:07 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
Uhmmm I don't think to have understood what you really mean, anyway Half-life has a type of packet for sending messages to the server (so not visible to other players if I'm not in error), the packet which starts with the L


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC [ DST ]


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 post attachments in this forum

Search for:
cron