- Timestamp:
- 11/07/17 17:16:31 (3 years ago)
- Branches:
- cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- 05b65ae
- Parents:
- de825b5
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_ndag.c
rde825b5 re68325b 717 717 int i, ret, readybufs, gottime; 718 718 struct timeval tv; 719 uint8_t rectype; 719 720 720 721 readybufs = 0; … … 773 774 774 775 /* Check that we have a valid nDAG encap record */ 775 if (check_ndag_header(rt->sources[i].saved[nw], ret) != 776 NDAG_PKT_ENCAPERF) { 776 rectype = check_ndag_header(rt->sources[i].saved[nw], ret); 777 778 if (rectype == NDAG_PKT_KEEPALIVE) { 779 /* Keep-alive, reset startidle and carry on. Don't 780 * change nextwrite -- we want to overwrite the 781 * keep-alive with usable content. */ 782 continue; 783 } else if (rectype != NDAG_PKT_ENCAPERF) { 777 784 fprintf(stderr, "Received invalid record on the channel for %s:%u.\n", 778 785 rt->sources[i].groupaddr, … … 787 794 (rt->sources[i].nextwriteind + 1) % ENCAP_BUFFERS; 788 795 789 /* Savethe useful info from the encap header */796 /* Get the useful info from the encap header */ 790 797 encaphdr = (ndag_encap_t *)(rt->sources[i].saved[nw] + 791 798 sizeof(ndag_common_t)); … … 798 805 rt->sources[i].expectedseq = ntohl(encaphdr->seqno) + 1; 799 806 800 /* If all good, skip past the nDAG headers */801 807 if (rt->sources[i].nextread == NULL) { 808 /* If this is our first read, set up 'nextread' 809 * by skipping past the nDAG headers */ 802 810 rt->sources[i].nextread = rt->sources[i].saved[0] + 803 811 sizeof(ndag_common_t) + sizeof(ndag_encap_t); -
lib/format_ndag.h
rea75ec2 re68325b 15 15 NDAG_PKT_RESTARTED = 0x03, 16 16 NDAG_PKT_ENCAPRT = 0x04, 17 NDAG_PKT_KEEPALIVE = 0x05 17 18 }; 18 19
Note: See TracChangeset
for help on using the changeset viewer.