| rfc9187v2.txt | rfc9187.txt | |||
|---|---|---|---|---|
| skipping to change at line 368 ¶ | skipping to change at line 368 ¶ | |||
| // to received SEQ | // to received SEQ | |||
| // variables used to validate the computed SNE: | // variables used to validate the computed SNE: | |||
| unsigned long SEG_HIGH; // input - xmitter side SNE | unsigned long SEG_HIGH; // input - xmitter side SNE | |||
| // -> SNE should match this value | // -> SNE should match this value | |||
| unsigned long long BIG_PREV; // prev 64-bit total seqno | unsigned long long BIG_PREV; // prev 64-bit total seqno | |||
| unsigned long long BIG_THIS = 0; // current 64-bit total seqno | unsigned long long BIG_THIS = 0; // current 64-bit total seqno | |||
| // -> THIS, PREV should never jump | // -> THIS, PREV should never jump | |||
| // more than half the SEQ space | // more than half the SEQ space | |||
| char *prompt = "Hex input (2 groups of 8 hex chars with a | char *prompt = "Input hex numbers only (0x is optional)\n\n") | |||
| space): "; | "\tHex input\n" | |||
| "\t(2 hex numbers separated by whitespace," | ||||
| fprintf(stderr,"Input hex numbers only (0x is optional)\n\n"); | "each with 8 or fewer digits)"; | |||
| fprintf(stderr,"%s\n",prompt); | fprintf(stderr,"%s\n",prompt); | |||
| while (scanf("%lx %lx",&SEG_HIGH,&SEG_SEQ) == 2) { | while (scanf("%lx %lx",&SEG_HIGH,&SEG_SEQ) == 2) { | |||
| BIG_PREV = BIG_THIS; | BIG_PREV = BIG_THIS; | |||
| BIG_THIS = (((unsigned long long)SEG_HIGH) << 32) | BIG_THIS = (((unsigned long long)SEG_HIGH) << 32) | |||
| | ((unsigned long long)SEG_SEQ); | | ((unsigned long long)SEG_SEQ); | |||
| // given SEG_SEQ, compute SNE | // given SEG_SEQ, compute SNE | |||
| SNE = compute_sne(SEG_SEQ); | SNE = compute_sne(SEG_SEQ); | |||
| End of changes. 1 change blocks. | ||||
| 4 lines changed or deleted | 4 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||