Auto merge of #508 - APTy:ipproto-icmp, r=alexcrichton
Add IPPROTO_ICMP and IPPROTO_ICMPV6 system constants This adds the protocol value for `ICMP` in both IPv4 and IPv6 variants. ICMP protocol constant for IPv4 defined as `1` per [RFC 792](https://tools.ietf.org/html/rfc792) ICMP protocol constant for IPv6 defined as `58` per [RFC 2463](https://tools.ietf.org/html/rfc2463#section-1) #### Reference [bsd/apple: netinet/in.h](https://opensource.apple.com/source/xnu/xnu-1699.24.8/bsd/netinet/in.h) [bsd/freebsdlike/freebsd: netinet/in.h](https://github.com/freebsd/freebsd/blob/master/sys/netinet/in.h#L42) [bsd/freebsdlike/dragonfly: netinet/in.h](1f249c981c/sys/netinet/in.h (L64)
) [bsd/netbsdlike: netinet/in.h](af5d253140/sys/netinet/in.h (L77)
) [unix/haiku: netinet/in.h](b65adbdfbc/headers/posix/netinet/in.h (L54)
) [unix/notbsd/linux: in.h](8fa3b6f939/include/uapi/linux/in.h (L31)
) - [unix/notbsd/linux: in6.h](8fa3b6f939/include/uapi/linux/in6.h (L134)
)
This commit is contained in:
commit
04d2c7af0c
@ -826,6 +826,8 @@ pub const SOCK_STREAM: ::c_int = 1;
|
||||
pub const SOCK_DGRAM: ::c_int = 2;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 5;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
@ -547,6 +547,8 @@ pub const SOCK_STREAM: ::c_int = 1;
|
||||
pub const SOCK_DGRAM: ::c_int = 2;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 5;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
@ -363,6 +363,8 @@ pub const SOCK_STREAM: ::c_int = 1;
|
||||
pub const SOCK_DGRAM: ::c_int = 2;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 5;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
@ -536,6 +536,8 @@ pub const AF_UNIX: ::c_int = 9;
|
||||
pub const AF_INET: ::c_int = 1;
|
||||
pub const AF_INET6: ::c_int = 6;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
@ -437,6 +437,8 @@ pub const AF_INET6: ::c_int = 10;
|
||||
pub const AF_UNSPEC: ::c_int = 0;
|
||||
pub const AF_NETLINK: ::c_int = 16;
|
||||
pub const SOCK_RAW: ::c_int = 3;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
@ -782,6 +782,8 @@ pub const SOCK_STREAM: ::c_int = 2;
|
||||
pub const SOCK_RAW: ::c_int = 4;
|
||||
pub const SOCK_RDM: ::c_int = 5;
|
||||
pub const SOCK_SEQPACKET: ::c_int = 6;
|
||||
pub const IPPROTO_ICMP: ::c_int = 1;
|
||||
pub const IPPROTO_ICMPV6: ::c_int = 58;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_IPV6: ::c_int = 41;
|
||||
|
Loading…
Reference in New Issue
Block a user