Send "connect" control message
sz3003 at gmail.com
Tue Apr 6 15:32:42 UTC 2010
I want to send a connect control message from an ng_hub node to the followin
I've tired by filling within the ng_hub node the sockaddr_in structure named
connect_addr->sin_len = 16;
connect_addr->sin_family = AF_INET;
connect_addr->sin_port = htons(55056);
connect_addr->sin_addr.s_addr = htonl(IP_REMOTE);
And send it to the following node as:
*(struct sockaddr_in *)msg->data = connect_addr;
But first of all, I don't know how I can convert the IP_REMOTE, which is
currently IP_REMOTE = "10.0.0.90", into a in_addr structure...
Does anyone can suggest me how to fix it?
More information about the freebsd-net