This is the reverse of streamEncodeID(): the decoded ID will be stored * in the 'id' structure passed by reference. The buffer 'buf' must point * to a 128 bit big-endian encoded ID. */
| 379 | * in the 'id' structure passed by reference. The buffer 'buf' must point |
| 380 | * to a 128 bit big-endian encoded ID. */ |
| 381 | void streamDecodeID(void *buf, streamID *id) { |
| 382 | uint64_t e[2]; |
| 383 | memcpy(e,buf,sizeof(e)); |
| 384 | id->ms = ntohu64(e[0]); |
| 385 | id->seq = ntohu64(e[1]); |
| 386 | } |
| 387 | |
| 388 | /* Compare two stream IDs. Return -1 if a < b, 0 if a == b, 1 if a > b. */ |
| 389 | int streamCompareID(streamID *a, streamID *b) { |
no outgoing calls
no test coverage detected