Prev: Not able to change baud rate
Next: Basic Shell concept
From: Bill Cunningham on 31 Mar 2010 17:07 "Rick Jones" <rick.jones2(a)hp.com> wrote in message news:hou1d3$pr4$2(a)usenet01.boi.hp.com... > As far as writing a sockets program goes, you should be ignoring > question of ARP or how a system is assigned an IP address. > > When it comes to the simplest client code: > > "You have the right to not code. Anything you code can and will be > used against you by the compiler. You have the right to call bind(). > If you cannot afford a bind() call, one will be made for you by > connect()." :) > > rick jones OK how's this for starters? I've done this so far and I know it's not much. I don't know if I need all the headers I've brought into scope though. #include <stdio.h> #include <sys/socket.h> #include <inet/in.h> #include <arpa/inet.h> struct sockaddr_storage storage; struct sockaddr address; struct msghdr message; struct cmsghdr cmess; sa_family_t family=AF_INET; Atleast a socket family has been declared. Bill
From: Bill Cunningham on 31 Mar 2010 17:20
"Bill Cunningham" <nospam(a)nspam.invalid> wrote in message news:4bb3ab97$0$12430$bbae4d71(a)news.suddenlink.net... [snip] > sa_family_t family=AF_INET; I know I could probably just pass AF_INET to the right function as a parameter but atleast it's declared anyway. Bill |