| OLD | NEW |
| 1 /* | 1 /* |
| 2 * ut-sim.h | 2 * ut-sim.h |
| 3 * | 3 * |
| 4 * an unreliable transport simulator | 4 * an unreliable transport simulator |
| 5 * (for testing replay databases and suchlike) | 5 * (for testing replay databases and suchlike) |
| 6 * | 6 * |
| 7 * David A. McGrew | 7 * David A. McGrew |
| 8 * Cisco Systems, Inc. | 8 * Cisco Systems, Inc. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 * | 44 * |
| 45 */ | 45 */ |
| 46 | 46 |
| 47 | 47 |
| 48 | 48 |
| 49 #ifndef UT_SIM_H | 49 #ifndef UT_SIM_H |
| 50 #define UT_SIM_H | 50 #define UT_SIM_H |
| 51 | 51 |
| 52 #include "integers.h" /* for uint32_t */ | 52 #include "integers.h" /* for uint32_t */ |
| 53 | 53 |
| 54 #ifdef __cplusplus |
| 55 extern "C" { |
| 56 #endif |
| 57 |
| 54 #define UT_BUF 160 /* maximum amount of packet reorder */ | 58 #define UT_BUF 160 /* maximum amount of packet reorder */ |
| 55 | 59 |
| 56 typedef struct { | 60 typedef struct { |
| 57 uint32_t index; | 61 uint32_t index; |
| 58 uint32_t buffer[UT_BUF]; | 62 uint32_t buffer[UT_BUF]; |
| 59 } ut_connection; | 63 } ut_connection; |
| 60 | 64 |
| 61 /* | 65 /* |
| 62 * ut_init(&u) initializes the ut_connection | 66 * ut_init(&u) initializes the ut_connection |
| 63 * | 67 * |
| 64 * this function should always be the first one called on a new | 68 * this function should always be the first one called on a new |
| 65 * ut_connection | 69 * ut_connection |
| 66 */ | 70 */ |
| 67 | 71 |
| 68 void | 72 void |
| 69 ut_init(ut_connection *utc); | 73 ut_init(ut_connection *utc); |
| 70 | 74 |
| 71 /* | 75 /* |
| 72 * ut_next_index(&u) returns the next index from the simulated | 76 * ut_next_index(&u) returns the next index from the simulated |
| 73 * unreliable connection | 77 * unreliable connection |
| 74 */ | 78 */ |
| 75 | 79 |
| 76 uint32_t | 80 uint32_t |
| 77 ut_next_index(ut_connection *utc); | 81 ut_next_index(ut_connection *utc); |
| 78 | 82 |
| 83 #ifdef __cplusplus |
| 84 } |
| 85 #endif |
| 79 | 86 |
| 80 #endif /* UT_SIM_H */ | 87 #endif /* UT_SIM_H */ |
| OLD | NEW |