@@ -261,18 +261,10 @@ pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
261
261
pub const LC_TELEPHONE_MASK : :: c_int = ( 1 << LC_TELEPHONE ) ;
262
262
pub const LC_MEASUREMENT_MASK : :: c_int = ( 1 << LC_MEASUREMENT ) ;
263
263
pub const LC_IDENTIFICATION_MASK : :: c_int = ( 1 << LC_IDENTIFICATION ) ;
264
- pub const LC_ALL_MASK : :: c_int = :: LC_CTYPE_MASK
265
- | :: LC_NUMERIC_MASK
266
- | :: LC_TIME_MASK
267
- | :: LC_COLLATE_MASK
268
- | :: LC_MONETARY_MASK
269
- | :: LC_MESSAGES_MASK
270
- | LC_PAPER_MASK
271
- | LC_NAME_MASK
272
- | LC_ADDRESS_MASK
273
- | LC_TELEPHONE_MASK
274
- | LC_MEASUREMENT_MASK
275
- | LC_IDENTIFICATION_MASK ;
264
+ pub const LC_ALL_MASK : :: c_int =
265
+ :: LC_CTYPE_MASK | :: LC_NUMERIC_MASK | :: LC_TIME_MASK | :: LC_COLLATE_MASK |
266
+ :: LC_MONETARY_MASK | :: LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK |
267
+ LC_ADDRESS_MASK | LC_TELEPHONE_MASK | LC_MEASUREMENT_MASK | LC_IDENTIFICATION_MASK ;
276
268
277
269
pub const MAP_ANON : :: c_int = 0x0020 ;
278
270
pub const MAP_ANONYMOUS : :: c_int = 0x0020 ;
@@ -543,12 +535,12 @@ pub const CBAUD: ::tcflag_t = 0o0010017;
543
535
pub const TAB1 : :: c_int = 0x00000800 ;
544
536
pub const TAB2 : :: c_int = 0x00001000 ;
545
537
pub const TAB3 : :: c_int = 0x00001800 ;
546
- pub const CR1 : :: c_int = 0x00000200 ;
547
- pub const CR2 : :: c_int = 0x00000400 ;
548
- pub const CR3 : :: c_int = 0x00000600 ;
549
- pub const FF1 : :: c_int = 0x00008000 ;
550
- pub const BS1 : :: c_int = 0x00002000 ;
551
- pub const VT1 : :: c_int = 0x00004000 ;
538
+ pub const CR1 : :: c_int = 0x00000200 ;
539
+ pub const CR2 : :: c_int = 0x00000400 ;
540
+ pub const CR3 : :: c_int = 0x00000600 ;
541
+ pub const FF1 : :: c_int = 0x00008000 ;
542
+ pub const BS1 : :: c_int = 0x00002000 ;
543
+ pub const VT1 : :: c_int = 0x00004000 ;
552
544
pub const VWERASE : usize = 14 ;
553
545
pub const VREPRINT : usize = 12 ;
554
546
pub const VSUSP : usize = 10 ;
@@ -580,6 +572,65 @@ pub const ICANON: ::tcflag_t = 0x00000002;
580
572
pub const PENDIN : :: tcflag_t = 0x00004000 ;
581
573
pub const NOFLSH : :: tcflag_t = 0x00000080 ;
582
574
575
+ pub const NETLINK_ROUTE : :: c_int = 0 ;
576
+ pub const NETLINK_UNUSED : :: c_int = 1 ;
577
+ pub const NETLINK_USERSOCK : :: c_int = 2 ;
578
+ pub const NETLINK_FIREWALL : :: c_int = 3 ;
579
+ pub const NETLINK_SOCK_DIAG : :: c_int = 4 ;
580
+ pub const NETLINK_NFLOG : :: c_int = 5 ;
581
+ pub const NETLINK_XFRM : :: c_int = 6 ;
582
+ pub const NETLINK_SELINUX : :: c_int = 7 ;
583
+ pub const NETLINK_ISCSI : :: c_int = 8 ;
584
+ pub const NETLINK_AUDIT : :: c_int = 9 ;
585
+ pub const NETLINK_FIB_LOOKUP : :: c_int = 10 ;
586
+ pub const NETLINK_CONNECTOR : :: c_int = 11 ;
587
+ pub const NETLINK_NETFILTER : :: c_int = 12 ;
588
+ pub const NETLINK_IP6_FW : :: c_int = 13 ;
589
+ pub const NETLINK_DNRTMSG : :: c_int = 14 ;
590
+ pub const NETLINK_KOBJECT_UEVENT : :: c_int = 15 ;
591
+ pub const NETLINK_GENERIC : :: c_int = 16 ;
592
+ pub const NETLINK_SCSITRANSPORT : :: c_int = 18 ;
593
+ pub const NETLINK_ECRYPTFS : :: c_int = 19 ;
594
+ pub const NETLINK_RDMA : :: c_int = 20 ;
595
+ pub const NETLINK_CRYPTO : :: c_int = 21 ;
596
+ pub const NETLINK_INET_DIAG : :: c_int = NETLINK_SOCK_DIAG ;
597
+
598
+ pub const MAX_LINKS : :: c_int = 32 ;
599
+
600
+ pub const NLM_F_REQUEST : :: c_int = 1 ;
601
+ pub const NLM_F_MULTI : :: c_int = 2 ;
602
+ pub const NLM_F_ACK : :: c_int = 4 ;
603
+ pub const NLM_F_ECHO : :: c_int = 8 ;
604
+ pub const NLM_F_DUMP_INTR : :: c_int = 16 ;
605
+
606
+ pub const NLM_F_ROOT : :: c_int = 0x100 ;
607
+ pub const NLM_F_MATCH : :: c_int = 0x200 ;
608
+ pub const NLM_F_ATOMIC : :: c_int = 0x400 ;
609
+ pub const NLM_F_DUMP : :: c_int = NLM_F_ROOT | NLM_F_MATCH ;
610
+
611
+ pub const NLM_F_REPLACE : :: c_int = 0x100 ;
612
+ pub const NLM_F_EXCL : :: c_int = 0x200 ;
613
+ pub const NLM_F_CREATE : :: c_int = 0x400 ;
614
+ pub const NLM_F_APPEND : :: c_int = 0x800 ;
615
+
616
+ pub const NLMSG_NOOP : :: c_int = 0x1 ;
617
+ pub const NLMSG_ERROR : :: c_int = 0x2 ;
618
+ pub const NLMSG_DONE : :: c_int = 0x3 ;
619
+ pub const NLMSG_OVERRUN : :: c_int = 0x4 ;
620
+ pub const NLMSG_MIN_TYPE : :: c_int = 0x10 ;
621
+
622
+ pub const NETLINK_ADD_MEMBERSHIP : :: c_int = 1 ;
623
+ pub const NETLINK_DROP_MEMBERSHIP : :: c_int = 2 ;
624
+ pub const NETLINK_PKTINFO : :: c_int = 3 ;
625
+ pub const NETLINK_BROADCAST_ERROR : :: c_int = 4 ;
626
+ pub const NETLINK_NO_ENOBUFS : :: c_int = 5 ;
627
+ pub const NETLINK_RX_RING : :: c_int = 6 ;
628
+ pub const NETLINK_TX_RING : :: c_int = 7 ;
629
+
630
+ pub const NLA_F_NESTED : :: c_int = 1 << 15 ;
631
+ pub const NLA_F_NET_BYTEORDER : :: c_int = 1 << 14 ;
632
+ pub const NLA_TYPE_MASK : :: c_int = !( NLA_F_NESTED | NLA_F_NET_BYTEORDER ) ;
633
+
583
634
f ! {
584
635
pub fn sigemptyset( set: * mut sigset_t) -> :: c_int {
585
636
* set = 0 ;
@@ -665,33 +716,32 @@ f! {
665
716
}
666
717
}
667
718
668
- extern {
719
+ extern "C" {
669
720
static mut __progname: * mut :: c_char ;
670
721
}
671
722
672
- extern {
673
- pub fn madvise ( addr : * const :: c_void , len : :: size_t , advice : :: c_int )
674
- -> :: c_int ;
723
+ extern "C" {
724
+ pub fn madvise ( addr : * const :: c_void , len : :: size_t , advice : :: c_int ) -> :: c_int ;
675
725
pub fn ioctl ( fd : :: c_int , request : :: c_int , ...) -> :: c_int ;
676
- pub fn readlink ( path : * const :: c_char ,
677
- buf : * mut :: c_char ,
678
- bufsz : :: size_t )
679
- -> :: c_int ;
680
- pub fn msync ( addr : * const :: c_void , len : :: size_t ,
681
- flags : :: c_int ) -> :: c_int ;
682
- pub fn mprotect ( addr : * const :: c_void , len : :: size_t , prot : :: c_int )
683
- -> :: c_int ;
726
+ pub fn readlink ( path : * const :: c_char , buf : * mut :: c_char , bufsz : :: size_t ) -> :: c_int ;
727
+ pub fn msync ( addr : * const :: c_void , len : :: size_t , flags : :: c_int ) -> :: c_int ;
728
+ pub fn mprotect ( addr : * const :: c_void , len : :: size_t , prot : :: c_int ) -> :: c_int ;
684
729
pub fn sysconf ( name : :: c_int ) -> :: c_long ;
685
- pub fn recvfrom ( socket : :: c_int , buf : * mut :: c_void , len : :: size_t ,
686
- flags : :: c_int , addr : * const :: sockaddr ,
687
- addrlen : * mut :: socklen_t ) -> :: ssize_t ;
730
+ pub fn recvfrom ( socket : :: c_int ,
731
+ buf : * mut :: c_void ,
732
+ len : :: size_t ,
733
+ flags : :: c_int ,
734
+ addr : * const :: sockaddr ,
735
+ addrlen : * mut :: socklen_t )
736
+ -> :: ssize_t ;
688
737
pub fn getnameinfo ( sa : * const :: sockaddr ,
689
738
salen : :: socklen_t ,
690
739
host : * mut :: c_char ,
691
740
hostlen : :: size_t ,
692
741
serv : * mut :: c_char ,
693
742
sevlen : :: size_t ,
694
- flags : :: c_int ) -> :: c_int ;
743
+ flags : :: c_int )
744
+ -> :: c_int ;
695
745
pub fn ptrace ( request : :: c_int , ...) -> :: c_long ;
696
746
pub fn getpriority ( which : :: c_int , who : :: c_int ) -> :: c_int ;
697
747
pub fn setpriority ( which : :: c_int , who : :: c_int , prio : :: c_int ) -> :: c_int ;
0 commit comments