Similar Threads:
1.SOCK_DGRAM duplex problem
I'm wondering exactly how datagram sockets work. I have two network nodes on
which I have bound to a certain port to listen for messages. One side (side
A) sends a message which is ACKed by the receiving side (side B) and then the
message from side A is forwarded to other nodes which haven't got the message
(side C, D and E). However, when the message is forwarded to side C it also
seems to end up at B again looking like it is addressed from C. However, C
has not sent this message. C does in fact not even have the program running.
What has happened?
2.WSPConnect questions
Hello All!
I have a questions about WSPConnect LSP API.
I want to finish connect in other thread and met 2 problems:
1. I want to use call lower layer WSPConnect in other thread
if socket is into non-blocking mode. Can I use pointers to
all parameters which were specified by my LSP layer
or I have to make copy of parameters that were given to me?
I mean these parameters:
const sockaddr FAR *name, LPWSABUF lpCallerData, LPWSABUF lpCalleeData,
LPQOS lpSQOS, LPQOS lpGQOS, LPINT lpErrno
2. How to set connecting state for socket until I call
WSPConnect of lower layer? The problem is that WSPConnect
can be non-blocking and I need to ask server whether permit or
deny of connection. This is long time operation. So before I'm calling
WSPConnect of lower LSP layer I want to set state of my socket
to connecting.
Is it possible to set this state or I have to store this state in
my LSP dll and process WSPSelect, WSPAsyncSelect, ... etc
functions manually?
Best Regards,
Voronkov Konstantin
3.accept() and SOCK_DGRAM
From my tests I can see that accept() is not called when using SOCK_DGRAM,
only when using SOCK_STREAM, when creating the SOCKET. How can you make sure
the connection is established in SOCK_DGRAM before you start trying to send
data?
4.LSP and port number in WSPConnect
Hello All ,
I am usig following code to determine on which remote port the socket is
trying to connect.
int WSPConnect(SOCKET s, const struct sockaddr FAR*name , ....)
{
if(!IsBadReadPtr(name->sa_data,14))
{
sockaddr_in FAR* sockPtr=(sockaddr_in FAR*)name;
HOSTENT* HostInfo= gethostbyaddr((char*)&(sockPtr->sin_addr),4,AF_INET);
if(HostInfo)
dbgprint("Connect req. for %d Port on
%s\n",sockPtr->sin_port,HostInfo->h_name);
else
dbgprint("Connect Req. on %d port",sockPtr->sin_port);
}
}
But I dont get correct port number , I get correct IP address.
Is there any problem with the code or I need something diff. mechanism to
determine port number. I want to identify port number 80 and 23.
Thanks for your time.
Pawar
5.Reliability of SOCK_DGRAM Unix-Domain sockets
Hello there,
in unix(7) of the Linux Programmer's Manual it is stated that:
(as on most Unix implementations, Unix domain datagram
sockets are always reliable and don't reorder datagrams)
I've tried hard to find some solid evidence whether or not this also
applies to Linux 2.6.x - but sadly, I've failed. Could anyone please
comment on Linux' behavior concerning datagram Unix-domain sockets?
Thanks,
Kai
6. Why control messages are restricted to non SOCK_STREAM sockets ?
7. TSP: intercepting "WSPConnect": value of "name" parameter always "0.0.0.0"?