@@ -17,12 +17,12 @@ pub struct netmap_slot {
1717 pub ptr : u64 ,
1818}
1919
20- pub const NS_BUF_CHANGED : c_int = 0x0001 ;
21- pub const NS_REPORT : c_int = 0x0002 ;
22- pub const NS_FORWARD : c_int = 0x0004 ;
23- pub const NS_NO_LEARN : c_int = 0x0008 ;
24- pub const NS_INDIRECT : c_int = 0x0010 ;
25- pub const NS_MOREFRAG : c_int = 0x0020 ;
20+ pub const NS_BUF_CHANGED : u16 = 0x0001 ;
21+ pub const NS_REPORT : u16 = 0x0002 ;
22+ pub const NS_FORWARD : u16 = 0x0004 ;
23+ pub const NS_NO_LEARN : u16 = 0x0008 ;
24+ pub const NS_INDIRECT : u16 = 0x0010 ;
25+ pub const NS_MOREFRAG : u16 = 0x0020 ;
2626
2727pub const NS_PORT_SHIFT : c_int = 8 ;
2828pub const NS_PORT_MASK : c_int = ( 0xff << NS_PORT_SHIFT ) ;
@@ -58,8 +58,8 @@ impl Clone for netmap_ring {
5858 }
5959}
6060
61- pub const NR_TIMESTAMP : c_int = 0x0002 ;
62- pub const NR_FORWARD : c_int = 0x0004 ;
61+ pub const NR_TIMESTAMP : u32 = 0x0002 ;
62+ pub const NR_FORWARD : u32 = 0x0004 ;
6363
6464#[ repr( C ) ]
6565#[ derive( Clone , Copy ) ]
@@ -124,16 +124,22 @@ pub const NETMAP_BDG_HOST: c_int = 1;
124124
125125pub const NR_REG_MASK : c_int = 0xf ;
126126
127- pub const NR_REG_DEFAULT : c_int = 0 ;
128- pub const NR_REG_ALL_NIC : c_int = 1 ;
129- pub const NR_REG_SW : c_int = 2 ;
130- pub const NR_REG_NIC_SW : c_int = 3 ;
131- pub const NR_REG_ONE_NIC : c_int = 4 ;
132- pub const NR_REG_PIPE_MASTER : c_int = 5 ;
133- pub const NR_REG_PIPE_SLAVE : c_int = 6 ;
134-
135- pub const NR_MONITOR_TX : c_int = 0x100 ;
136- pub const NR_MONITOR_RX : c_int = 0x200 ;
127+ pub const NR_REG_DEFAULT : u32 = 0 ;
128+ pub const NR_REG_ALL_NIC : u32 = 1 ;
129+ pub const NR_REG_SW : u32 = 2 ;
130+ pub const NR_REG_NIC_SW : u32 = 3 ;
131+ pub const NR_REG_ONE_NIC : u32 = 4 ;
132+ pub const NR_REG_PIPE_MASTER : u32 = 5 ;
133+ pub const NR_REG_PIPE_SLAVE : u32 = 6 ;
134+
135+ pub const NR_MONITOR_TX : u32 = 0x100 ;
136+ pub const NR_MONITOR_RX : u32 = 0x200 ;
137+ pub const NR_ZCOPY_MON : u32 = 0x400 ;
138+ pub const NR_EXCLUSIVE : u32 = 0x800 ;
139+ pub const NR_PTNETMAP_HOST : u32 = 0x1000 ;
140+ pub const NR_RX_RINGS_ONLY : u32 = 0x2000 ;
141+ pub const NR_TX_RINGS_ONLY : u32 = 0x4000 ;
142+ pub const NR_ACCEPT_VNET_HDR : u32 = 0x8000 ;
137143
138144#[ cfg( target_os = "linux" ) ]
139145pub const NIOCGINFO : c_ulong = 3225184657 ;
0 commit comments