ccn_private.h

Go to the documentation of this file.
00001 /**
00002  * @file ccn/ccn_private.h
00003  *
00004  * Additional operations that are irrevalent for most clients.
00005  *
00006  * Part of the CCNx C Library.
00007  *
00008  * Copyright (C) 2009 Palo Alto Research Center, Inc.
00009  *
00010  * This library is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU Lesser General Public License version 2.1
00012  * as published by the Free Software Foundation.
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details. You should have received
00017  * a copy of the GNU Lesser General Public License along with this library;
00018  * if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Fifth Floor, Boston, MA 02110-1301 USA.
00020  */
00021 
00022 #ifndef CCN_PRIVATE_DEFINED
00023 #define CCN_PRIVATE_DEFINED
00024 
00025 #include <sys/types.h>
00026 #include <stdint.h>
00027 
00028 struct ccn;
00029 struct ccn_charbuf;
00030 struct sockaddr_un;
00031 struct sockaddr;
00032 struct ccn_schedule;
00033 
00034 /*
00035  * Dispatch a message as if it had arrived on the socket
00036  */
00037 void ccn_dispatch_message(struct ccn *h, unsigned char *msg, size_t size);
00038 
00039 /*
00040  * Do any time-based operations
00041  * Returns number of microseconds before next call needed
00042  */
00043 int ccn_process_scheduled_operations(struct ccn *h);
00044 
00045 /*
00046  * get or set the schedule in a handle.  Events on this schedule will
00047  * be run from the ccn_run() calls.
00048  */
00049 struct ccn_schedule *ccn_get_schedule(struct ccn *h);
00050 struct ccn_schedule *ccn_set_schedule(struct ccn *h, struct ccn_schedule *s);
00051 
00052 /*
00053  * Grab buffered output
00054  * Caller should destroy returned buffer.
00055  */
00056 struct ccn_charbuf *ccn_grab_buffered_output(struct ccn *h);
00057 
00058 /*
00059  * set up client sockets for communicating with ccnd
00060  * In the INET case, the sockaddr passed in must be large enough to
00061  * hold either an IPv4 or IPv6 address.
00062  */
00063 void ccn_setup_sockaddr_un(const char *, struct sockaddr_un *);
00064 int ccn_setup_sockaddr_in(const char *, struct sockaddr *, int);
00065 
00066 void ccn_set_connect_type(struct ccn *h, const char *name);
00067 const char *ccn_get_connect_type(struct ccn *h);
00068 
00069 
00070 #endif
Generated on Tue Aug 21 14:54:17 2012 for Content-Centric Networking in C by  doxygen 1.6.3