Addressing UDP datagrams in UNIX

I am having troble to send a UNIX datagram to a NT machine. I didn`t realize yet how to define the destination address on the
sendto() function call.Simply writing "xxx.zz.yy.pp" for the IP and xxxx for the socket doesn�t work!!! Can anyone help me with that?
Thanks

This involves lots of winsock and other NT expertise and this is not the theme of this site.

You might try an NT site for how to debug and program their TCP/IP stack.

There is nothing to do with NT...my problem is that I am having
difficulties addressing a UDP datagram on the UNIX side.
the sendto() function has a parameter called sockaddr, which is
a struct and I don`t know how to define it correctly so that my
datagram can be sent to a given IP address and a given socket.

It's something like this:

struct sockaddr_in  server;

bzero((char *) &server, sizeof(server));
server.sin_family=AF_INET;
server.sin_addr.s_addr=inet_addr(---address goes here---);
serv_addr.sin_port=htons(---port goes here---);

No money back guarantees here, but it's at least close.

However, after the socket() call and before the sendto() call, you will need a bind() call. And bind() also requires an address structure. I'm guessing that you don't have that yet either. Remember that a socket is 4 data: local address, local port, remote address, remote port.

Thank you!!!!

I will try with that!!!!