struct ccnl_buf_s*
ccnl_frag_getnext(struct ccnl_frag_s *fr, int *ifndx, sockunion *su)
{
    if (!fr->bigpkt) return NULL;

    DEBUGMSG_EFRA(VERBOSE, "fragmenting %d bytes (@ %d)\n",
                  fr->bigpkt->datalen, fr->sendoffs);

    switch (fr->protocol) {
#ifdef OBSOLETE_BY_2015_06
#ifdef USE_SUITE_CCNB
    case CCNL_FRAG_SEQUENCED2012:
        return ccnl_frag_getnextSEQD2012(fr, ifndx, su);
    case CCNL_FRAG_CCNx2013:
        return ccnl_frag_getnextCCNx2013(fr, ifndx, su);
#endif
    case CCNL_FRAG_SEQUENCED2015:
        return ccnl_frag_getnextSEQD2015(fr, ifndx, su);
#endif
    case CCNL_FRAG_BEGINEND2015:
        return ccnl_frag_getnextBE2015(fr, ifndx, su);
    default:
        DEBUGMSG_EFRA(VERBOSE, "  unknown protocol %d\n", fr->protocol);
        return NULL;
    }
}
Exemple #2
0
struct ccnl_buf_s *
ccnl_frag_getnext(struct ccnl_frag_s *fr, int *ifndx, sockunion *su)
{
    if (!fr->bigpkt) {
        return NULL;
    }

    DEBUGMSG(99, "fragmenting %d bytes (@ %d)\n", fr->bigpkt->datalen,
             fr->sendoffs);

    switch (fr->protocol) {
        case CCNL_FRAG_SEQUENCED2012:
            return ccnl_frag_getnextSEQD2012(fr, ifndx, su);

        case CCNL_FRAG_CCNx2013:
            return ccnl_frag_getnextCCNx2013(fr, ifndx, su);

        default:
            return NULL;
    }
}