ccn_face_mgmt.c File Reference

Support for parsing and creating FaceInstance elements. More...

Go to the source code of this file.

Functions

struct ccn_face_instanceccn_face_instance_parse (const unsigned char *p, size_t size)
 Parse a ccnb-ecoded FaceInstance into an internal representation.
void ccn_face_instance_destroy (struct ccn_face_instance **pfi)
 Destroy the result of ccn_face_instance_parse().
int ccnb_append_face_instance (struct ccn_charbuf *c, const struct ccn_face_instance *fi)
 Marshal an internal face instance representation into ccnb form.

Detailed Description

Support for parsing and creating FaceInstance elements.

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_face_mgmt.c.


Function Documentation

void ccn_face_instance_destroy ( struct ccn_face_instance **  pfi  ) 
struct ccn_face_instance* ccn_face_instance_parse ( const unsigned char *  p,
size_t  size 
) [read]

Parse a ccnb-ecoded FaceInstance into an internal representation.

The space used for the various strings is held by the charbuf. A client may replace the strings with other pointers, but then assumes responsibilty for managing those pointers.

Returns:
pointer to newly allocated structure describing the face, or NULL if there is an error.

Definition at line 41 of file ccn_face_mgmt.c.

Referenced by ccnd_req_destroyface(), ccnd_req_newface(), create_face(), and main().

int ccnb_append_face_instance ( struct ccn_charbuf c,
const struct ccn_face_instance fi 
)

Marshal an internal face instance representation into ccnb form.

Definition at line 123 of file ccn_face_mgmt.c.

Referenced by ccnd_req_destroyface(), ccnd_req_newface(), create_face(), and main().

Generated on Fri May 13 16:27:21 2011 for Content-Centric Networking in C by  doxygen 1.6.3