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

    offset = outlen;
    len = ccnl_cistlv_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_cistlv_prependInterestWithHdr(struct ccnl_prefix_s *name,
                                int *offset, unsigned char *buf)
{
    return ccnl_cistlv_prependChunkInterestWithHdr(name, offset, buf);
}