Exemple #1
0
int
ccntlv_mkInterest(struct ccnl_prefix_s *name, int *dummy,
                  unsigned char *out, int outlen)
{
    (void) dummy;
     int len, offset;

     offset = outlen;
     len = ccnl_ccntlv_prependChunkInterestWithHdr(name, &offset, out);
     if (len > 0)
         memmove(out, out + offset, len);

     return len;
}
// write Interest packet *before* buf[offs], adjust offs and return bytes used
int
ccnl_ccntlv_prependInterestWithHdr(struct ccnl_prefix_s *name,
                                int *offset, unsigned char *buf)
{
    return ccnl_ccntlv_prependChunkInterestWithHdr(name, offset, buf);
}
// write Interest packet *before* buf[offs], adjust offs and return bytes used
int8_t
ccnl_ccntlv_prependInterestWithHdr(struct ccnl_prefix_s *name,
                                   size_t *offset, uint8_t *buf, size_t *len)
{
    return ccnl_ccntlv_prependChunkInterestWithHdr(name, offset, buf, len);
}