Part of the CCNx C Library. More...
|Holds a pair of socket file descriptors. More...|
|Text-friendly description of a socket (IPv4 or IPv6). More...|
|int||ccn_setup_socket (const struct ccn_sockdescr *descr, void(*logger)(void *, const char *,...), void *logdat, int(*getbound)(void *, struct sockaddr *, socklen_t), void *getbounddat, struct ccn_sockets *socks)|
|Utility for setting up a socket (or pair of sockets) from a text-based description. |
Part of the CCNx C Library.
Copyright (C) 2009-2011 Palo Alto Research Center, Inc.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Definition in file sockcreate.h.
|int ccn_setup_socket||(||const struct ccn_sockdescr *||descr,|
|void(*)(void *, const char *,...)||logger,|
|int(*)(void *, struct sockaddr *, socklen_t)||getbound,|
|struct ccn_sockets *||socks|
Utility for setting up a socket (or pair of sockets) from a text-based description.
Currently this is only used for UDP multicast.
|descr||hold the information needed to create the socket(s).|
|logger||should be used for reporting errors, printf-style.|
|logdat||must be passed as first argument to logger().|
|getbound||is callback for getting already-bound sender socket, should return -1 if none.|
|getbounddat||is passed as first argument to getbound|
|socks||will be filled in with the pair of socket file descriptors.|
Referenced by setup_multicast().