|
OpenVPN
|

Go to the source code of this file.
Functions | |
| bool | probe_request_write (struct buffer *buf, const struct probe_request *r) |
| Write a complete probe request TLV, header and value, to buf. | |
| bool | probe_request_read (struct buffer *buf, struct probe_request *r) |
| Read a probe request TLV value from buf. | |
| bool | probe_reply_write (struct buffer *buf, const struct probe_reply *r) |
| Write a complete probe reply TLV, header and value, to buf. | |
| bool | probe_reply_read (struct buffer *buf, struct probe_reply *r) |
| Read a probe reply TLV value from buf. | |
| bool probe_reply_read | ( | struct buffer * | buf, |
| struct probe_reply * | r ) |
Read a probe reply TLV value from buf.
The calling convention is that of probe_request_read().
The two flag combinations the protocol rules out are rejected here, since neither can be acted on: a reply must not call the other addresses of the remote both the same server and distinct ones, and it must not extend the connect_lifetime to those addresses without first calling them the same server.
Definition at line 67 of file probe.c.
References buf_len(), buf_read_u16(), buf_read_u64(), probe_reply::connect_lifetime, probe_reply::flags, probe_reply::max_latency_diff, probe_reply::priority, PROBE_REPLY_FLAG_ADDRS_EQUAL, PROBE_REPLY_FLAG_LIFETIME_SHARED, PROBE_REPLY_FLAG_PROBE_MORE, PROBE_REPLY_LEN, probe_reply::request_id, and probe_reply::weight.
Referenced by test_probe_reply_flags_contradict(), test_probe_reply_roundtrip(), and test_probe_reply_too_short().
| bool probe_reply_write | ( | struct buffer * | buf, |
| const struct probe_reply * | r ) |
Write a complete probe reply TLV, header and value, to buf.
Definition at line 58 of file probe.c.
References buf_write_u16(), buf_write_u64(), probe_reply::connect_lifetime, ctrl_msg_tlv_write_header(), probe_reply::flags, probe_reply::max_latency_diff, probe_reply::priority, PROBE_REPLY_LEN, probe_reply::request_id, TLV_TYPE_PROBE_REPLY, and probe_reply::weight.
Referenced by test_probe_reply_flags_contradict(), test_probe_reply_roundtrip(), and test_probe_reply_wire_format().
| bool probe_request_read | ( | struct buffer * | buf, |
| struct probe_request * | r ) |
Read a probe request TLV value from buf.
buf must cover exactly the TLV's value, as ctrl_msg_find_tlv() returns it. Bytes beyond the fields understood here are ignored, so a longer value from a future version still parses. Flag bits that are not known are kept in flags rather than rejected, for the same reason.
Definition at line 41 of file probe.c.
References buf_len(), buf_read_u32(), buf_read_u64(), probe_request::flags, PROBE_REQUEST_LEN, probe_request::request_id, and probe_request::timestamp.
Referenced by test_find_tlv_skips_optional_after_wanted(), test_probe_request_forward_compat(), test_probe_request_roundtrip(), and test_probe_request_too_short().
| bool probe_request_write | ( | struct buffer * | buf, |
| const struct probe_request * | r ) |
Write a complete probe request TLV, header and value, to buf.
Definition at line 33 of file probe.c.
References buf_write_u32(), buf_write_u64(), ctrl_msg_tlv_write_header(), probe_request::flags, PROBE_REQUEST_LEN, probe_request::request_id, probe_request::timestamp, and TLV_TYPE_PROBE_REQUEST.
Referenced by test_find_tlv_rejects_duplicate(), test_find_tlv_rejects_unknown_mandatory(), test_find_tlv_skips_optional_after_wanted(), test_find_tlv_trailing_bytes(), test_probe_request_roundtrip(), and test_probe_request_wire_format().