2019-01-08 11:13:37 -05:00
|
|
|
/* This file contains the SENDME cell definition. */
|
|
|
|
|
2019-03-07 11:20:23 -05:00
|
|
|
/* v1 digest length in bytes. */
|
|
|
|
const TRUNNEL_SENDME_V1_DIGEST_LEN = 20;
|
|
|
|
|
|
|
|
/* SENDME cell declaration. */
|
2019-01-08 11:13:37 -05:00
|
|
|
struct sendme_cell {
|
|
|
|
/* Version field. */
|
|
|
|
u8 version IN [0x00, 0x01];
|
|
|
|
|
2019-03-07 11:20:23 -05:00
|
|
|
/* Length of data contained in this cell. */
|
2019-01-08 11:13:37 -05:00
|
|
|
u16 data_len;
|
|
|
|
|
2019-03-07 11:20:23 -05:00
|
|
|
/* The data content depends on the version. */
|
|
|
|
union data[version] with length data_len {
|
|
|
|
0x00: ignore;
|
|
|
|
0x01: u8 v1_digest[TRUNNEL_SENDME_V1_DIGEST_LEN];
|
|
|
|
};
|
2019-01-08 11:13:37 -05:00
|
|
|
}
|