@@ -33,15 +33,15 @@ const TCP_CA_NAME_MAX: usize = 16;
33
33
///
34
34
/// * `$name:ident`: name of the type you want to implement `SetSockOpt` for.
35
35
/// * `$level:expr` : socket layer, or a `protocol level`: could be *raw sockets*
36
- /// (`libc::SOL_SOCKET`), *ip protocol* (libc::IPPROTO_IP), *tcp protocol* (`libc::IPPROTO_TCP`),
37
- /// and more. Please refer to your system manual for more options. Will be passed as the second
38
- /// argument (`level`) to the `setsockopt` call.
36
+ /// (`libc::SOL_SOCKET`), *ip protocol* (libc::IPPROTO_IP), *tcp protocol* (`libc::IPPROTO_TCP`),
37
+ /// and more. Please refer to your system manual for more options. Will be passed as the second
38
+ /// argument (`level`) to the `setsockopt` call.
39
39
/// * `$flag:path`: a flag name to set. Some examples: `libc::SO_REUSEADDR`, `libc::TCP_NODELAY`,
40
- /// `libc::IP_ADD_MEMBERSHIP` and others. Will be passed as the third argument (`option_name`)
41
- /// to the `setsockopt` call.
40
+ /// `libc::IP_ADD_MEMBERSHIP` and others. Will be passed as the third argument (`option_name`)
41
+ /// to the `setsockopt` call.
42
42
/// * Type of the value that you are going to set.
43
- /// * Type that implements the `Set` trait for the type from the previous item (like `SetBool` for
44
- /// `bool`, `SetUsize` for `usize`, etc.).
43
+ /// * Type that implements the `Set` trait for the type from the previous item
44
+ /// (like `SetBool` for `bool`, `SetUsize` for `usize`, etc.).
45
45
#[ macro_export]
46
46
macro_rules! setsockopt_impl {
47
47
( $name: ident, $level: expr, $flag: path, $ty: ty, $setter: ty) => {
@@ -87,15 +87,15 @@ macro_rules! setsockopt_impl {
87
87
///
88
88
/// * Name of the type you want to implement `GetSockOpt` for.
89
89
/// * Socket layer, or a `protocol level`: could be *raw sockets* (`lic::SOL_SOCKET`), *ip
90
- /// protocol* (libc::IPPROTO_IP), *tcp protocol* (`libc::IPPROTO_TCP`), and more. Please refer
91
- /// to your system manual for more options. Will be passed as the second argument (`level`) to
92
- /// the `getsockopt` call.
90
+ /// protocol* (libc::IPPROTO_IP), *tcp protocol* (`libc::IPPROTO_TCP`), and more. Please refer
91
+ /// to your system manual for more options. Will be passed as the second argument (`level`) to
92
+ /// the `getsockopt` call.
93
93
/// * A flag to set. Some examples: `libc::SO_REUSEADDR`, `libc::TCP_NODELAY`,
94
- /// `libc::SO_ORIGINAL_DST` and others. Will be passed as the third argument (`option_name`) to
95
- /// the `getsockopt` call.
94
+ /// `libc::SO_ORIGINAL_DST` and others. Will be passed as the third argument (`option_name`) to
95
+ /// the `getsockopt` call.
96
96
/// * Type of the value that you are going to get.
97
97
/// * Type that implements the `Get` trait for the type from the previous item (`GetBool` for
98
- /// `bool`, `GetUsize` for `usize`, etc.).
98
+ /// `bool`, `GetUsize` for `usize`, etc.).
99
99
#[ macro_export]
100
100
macro_rules! getsockopt_impl {
101
101
( $name: ident, $level: expr, $flag: path, $ty: ty, $getter: ty) => {
@@ -161,15 +161,15 @@ macro_rules! getsockopt_impl {
161
161
/// # Arguments
162
162
///
163
163
/// * `GetOnly`, `SetOnly` or `Both`: whether you want to implement only getter, only setter or
164
- /// both of them.
164
+ /// both of them.
165
165
/// * `$name:ident`: name of type `GetSockOpt`/`SetSockOpt` will be implemented for.
166
166
/// * `$level:expr` : socket layer, or a `protocol level`: could be *raw sockets*
167
- /// (`libc::SOL_SOCKET`), *ip protocol* (libc::IPPROTO_IP), *tcp protocol* (`libc::IPPROTO_TCP`),
168
- /// and more. Please refer to your system manual for more options. Will be passed as the second
169
- /// argument (`level`) to the `getsockopt`/`setsockopt` call.
167
+ /// (`libc::SOL_SOCKET`), *ip protocol* (libc::IPPROTO_IP), *tcp protocol* (`libc::IPPROTO_TCP`),
168
+ /// and more. Please refer to your system manual for more options. Will be passed as the second
169
+ /// argument (`level`) to the `getsockopt`/`setsockopt` call.
170
170
/// * `$flag:path`: a flag name to set. Some examples: `libc::SO_REUSEADDR`, `libc::TCP_NODELAY`,
171
- /// `libc::IP_ADD_MEMBERSHIP` and others. Will be passed as the third argument (`option_name`)
172
- /// to the `setsockopt`/`getsockopt` call.
171
+ /// `libc::IP_ADD_MEMBERSHIP` and others. Will be passed as the third argument (`option_name`)
172
+ /// to the `setsockopt`/`getsockopt` call.
173
173
/// * `$ty:ty`: type of the value that will be get/set.
174
174
/// * `$getter:ty`: `Get` implementation; optional; only for `GetOnly` and `Both`.
175
175
/// * `$setter:ty`: `Set` implementation; optional; only for `SetOnly` and `Both`.
0 commit comments