[net.lan] Help with internet sockets

brad@gcc-milo.ARPA (Brad Parker) (12/03/85)

Could someone give me a little help with BSD4.2 Internet sockets?

1. Where's a good place to find information (aside from the IPC draft
   of July 28, 1983 by Jay, et. al. or the BSD4.2 system manual)

2. It seems you can't send packets between two ports on the same
   machine. Is this true? (I get "can't assign address" errors)

3. How are Internet port #'s assigned? is it arbitrary? aside from the
   ports in /etc/services, can I just pick numbers out of the air?

I'd like to send Datagram packets between processes arbitrarily located
on the same or other machines. I tried to use streams with connect(),
but I couldn't get the receiving socket to block reads (got tons of
zero lenghth packet - even after ioctl(fd, FIONBIO, 1). So, I thought I'd
try internet SOCK_DGRAM style... I fill in sin_family with AF_INET and
sin_port with the port # of the other process (it's fixed and know). Then
I fire off a "sendto()" but, I get "can't assign address".

Any and all help will be appriciated. Wow, and I previously thought I
understood something about networking.... (90% of the time is always on
10% of the problem!)

-brad parker
-- 

J Bradford Parker
seismo!harvard!gcc-bill!brad

"Syntactic sugar causes cancer of the semicolon." - Alan Perlis