ccn_private.h File Reference

Additional operations that are irrevalent for most clients. More...

Go to the source code of this file.

Functions

void ccn_dispatch_message (struct ccn *h, unsigned char *msg, size_t size)
 Dispatch a message through the registered upcalls.
int ccn_process_scheduled_operations (struct ccn *h)
 Process any scheduled operations that are due.
struct ccn_schedule * ccn_get_schedule (struct ccn *h)
 Get the previously set event schedule from a ccn handle.
struct ccn_schedule * ccn_set_schedule (struct ccn *h, struct ccn_schedule *s)
 Set the event schedule in a ccn handle.
struct ccn_charbufccn_grab_buffered_output (struct ccn *h)
void ccn_setup_sockaddr_un (const char *, struct sockaddr_un *)
 Set up a unix-domain socket address for contacting ccnd.
int ccn_setup_sockaddr_in (const char *, struct sockaddr *, int)
 Set up a Internet socket address for contacting ccnd.
void ccn_set_connect_type (struct ccn *h, const char *name)
const char * ccn_get_connect_type (struct ccn *h)

Detailed Description

Additional operations that are irrevalent for most clients.

Part of the CCNx C Library.

Copyright (C) 2009 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 ccn_private.h.


Function Documentation

void ccn_dispatch_message ( struct ccn *  h,
unsigned char *  msg,
size_t  size 
)

Dispatch a message through the registered upcalls.

This is not used by normal ccn clients, but is made available for use when ccnd needs to communicate with its internal client.

Parameters:
h is the ccn handle.
msg is the ccnb-encoded Interest or ContentObject.
size is its size in bytes.

Definition at line 1576 of file ccn_client.c.

Referenced by ccn_process_input(), ccnd_send(), and r_io_send().

const char* ccn_get_connect_type ( struct ccn *  h  ) 

Definition at line 441 of file ccn_client.c.

Referenced by ccn_get().

struct ccn_schedule* ccn_get_schedule ( struct ccn *  h  )  [read]

Get the previously set event schedule from a ccn handle.

Parameters:
h is the ccn handle
Returns:
pointer to the event schedule

Definition at line 1872 of file ccn_client.c.

Referenced by ccns_open().

struct ccn_charbuf* ccn_grab_buffered_output ( struct ccn *  h  )  [read]
int ccn_process_scheduled_operations ( struct ccn *  h  ) 

Process any scheduled operations that are due.

This is not used by normal ccn clients, but is made available for use by ccnd to run its internal client.

Parameters:
h is the ccn handle.
Returns:
the number of microseconds until the next thing needs to happen.

Definition at line 1899 of file ccn_client.c.

Referenced by ccn_run(), ccnd_internal_client_refresh(), ccnr_direct_client_refresh(), ccnr_internal_client_refresh(), r_dispatch_run(), and wait_for_input_or_timeout().

void ccn_set_connect_type ( struct ccn *  h,
const char *  name 
)

Definition at line 430 of file ccn_client.c.

Referenced by ccn_connect().

struct ccn_schedule* ccn_set_schedule ( struct ccn *  h,
struct ccn_schedule *  schedule 
) [read]

Set the event schedule in a ccn handle.

Parameters:
h is the ccn handle
schedule is the new event schedule to be set in the handle
Returns:
pointer to the previous event schedule (or NULL)

Definition at line 1884 of file ccn_client.c.

Referenced by ccns_open().

int ccn_setup_sockaddr_in ( const char *  name,
struct sockaddr *  result,
int  length 
)

Set up a Internet socket address for contacting ccnd.

The name must be of the form "tcp[4|6][:port]" If there is no port specified, the environment variable CCN_LOCAL_PORT is checked. Bad port specifications will result in the default port (9695) being used. If neither "4" nor "6" is present, the code will prefer the IPv4 localhost address.

Returns:
0 on success, -1 on error

Definition at line 84 of file ccn_setup_sockaddr_un.c.

Referenced by ccn_connect().

void ccn_setup_sockaddr_un ( const char *  portstr,
struct sockaddr_un *  result 
)

Set up a unix-domain socket address for contacting ccnd.

If the environment variable CCN_LOCAL_SOCKNAME is set and not empty, it supplies the name stem; otherwise the compiled-in default is used.

If portstr is NULL or empty, the environment variable CCN_LOCAL_PORT is checked. If the portstr specifies something other than the ccnx registered port number, the socket name is modified accordingly.

Parameters:
portstr - numeric port; use NULL for default.

Definition at line 54 of file ccn_setup_sockaddr_un.c.

Referenced by ccn_connect(), ccnd_get_local_sockname(), main(), and r_net_get_local_sockname().

Generated on Tue Aug 21 14:54:39 2012 for Content-Centric Networking in C by  doxygen 1.6.3