Go to the source code of this file.
Defines | |
#define | XML(goop) ((void)0) |
This macro documents what's happening in the state machine by hinting at the XML syntax would be emitted in a re-encoder. | |
Functions | |
ssize_t | ccn_skeleton_decode (struct ccn_skeleton_decoder *d, const unsigned char *p, size_t n) |
Decodes ccnb decoded data. |
Part of the CCNx C Library.
Copyright (C) 2008, 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_coding.c.
#define XML | ( | goop | ) | ((void)0) |
This macro documents what's happening in the state machine by hinting at the XML syntax would be emitted in a re-encoder.
But it actually does nothing.
Definition at line 27 of file ccn_coding.c.
Referenced by ccn_skeleton_decode().
ssize_t ccn_skeleton_decode | ( | struct ccn_skeleton_decoder * | d, | |
const unsigned char * | p, | |||
size_t | n | |||
) |
Decodes ccnb decoded data.
d | holds the current state of the decoder. | |
p | points to a new block of ccnb data to feed to the decoder. | |
n | is the size of the input, in bytes. |
By setting the CCN_DSTATE_PAUSE bit is set in the decoder state, the decoder will additionally return just after recognizing each token. In this instance, use CCN_GET_TT_FROM_DSTATE() to extract the token type from the decoder state; CCN_CLOSE will be reported as CCN_NO_TOKEN.
The pause bit persists, so the end test should take that into account by using the CCN_FINAL_DSTATE() macro instead of testing for state 0.
Once an error state is entered, no addition input is processed.
Definition at line 57 of file ccn_coding.c.
Referenced by ccn_buf_advance(), ccn_buf_decoder_start(), ccn_process_input(), ccn_put(), ccnbx(), main(), process_data(), process_input(), process_input_buffer(), process_input_message(), process_test(), r_dispatch_process_input(), r_init_map_and_process_file(), r_store_content_read(), and test_insert_content().