@@ -33,15 +33,15 @@ const TCP_CA_NAME_MAX: usize = 16;
3333///
3434/// * `$name:ident`: name of the type you want to implement `SetSockOpt` for.
3535/// * `$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.
3939/// * `$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.
4242/// * 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.).
4545#[ macro_export]
4646macro_rules! setsockopt_impl {
4747 ( $name: ident, $level: expr, $flag: path, $ty: ty, $setter: ty) => {
@@ -87,15 +87,15 @@ macro_rules! setsockopt_impl {
8787///
8888/// * Name of the type you want to implement `GetSockOpt` for.
8989/// * 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.
9393/// * 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.
9696/// * Type of the value that you are going to get.
9797/// * 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.).
9999#[ macro_export]
100100macro_rules! getsockopt_impl {
101101 ( $name: ident, $level: expr, $flag: path, $ty: ty, $getter: ty) => {
@@ -161,15 +161,15 @@ macro_rules! getsockopt_impl {
161161/// # Arguments
162162///
163163/// * `GetOnly`, `SetOnly` or `Both`: whether you want to implement only getter, only setter or
164- /// both of them.
164+ /// both of them.
165165/// * `$name:ident`: name of type `GetSockOpt`/`SetSockOpt` will be implemented for.
166166/// * `$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.
170170/// * `$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.
173173/// * `$ty:ty`: type of the value that will be get/set.
174174/// * `$getter:ty`: `Get` implementation; optional; only for `GetOnly` and `Both`.
175175/// * `$setter:ty`: `Set` implementation; optional; only for `SetOnly` and `Both`.
0 commit comments