66// option. This file may not be copied, modified, or distributed
77// except according to those terms.
88
9- use ioctl_sys :: ioctl ;
9+ use nix :: { ioctl_none , ioctl_readwrite } ;
1010
1111#[ allow( non_camel_case_types) ]
1212#[ allow( non_upper_case_globals) ]
@@ -32,34 +32,34 @@ pub mod tcp {
3232// The documentation describing the order of calls and accepted parameters can be found at:
3333// http://man.openbsd.org/pf.4
3434// DIOCSTART
35- ioctl ! ( none pf_start with b'D' , 1 ) ;
35+ ioctl_none ! ( pf_start, b'D' , 1 ) ;
3636// DIOCSTOP
37- ioctl ! ( none pf_stop with b'D' , 2 ) ;
37+ ioctl_none ! ( pf_stop, b'D' , 2 ) ;
3838// DIOCADDRULE
39- ioctl ! ( readwrite pf_add_rule with b'D' , 4 ; pfvar:: pfioc_rule) ;
39+ ioctl_readwrite ! ( pf_add_rule, b'D' , 4 , pfvar:: pfioc_rule) ;
4040// DIOCGETRULES
41- ioctl ! ( readwrite pf_get_rules with b'D' , 6 ; pfvar:: pfioc_rule) ;
41+ ioctl_readwrite ! ( pf_get_rules, b'D' , 6 , pfvar:: pfioc_rule) ;
4242// DIOCGETRULE
43- ioctl ! ( readwrite pf_get_rule with b'D' , 7 ; pfvar:: pfioc_rule) ;
43+ ioctl_readwrite ! ( pf_get_rule, b'D' , 7 , pfvar:: pfioc_rule) ;
4444// DIOCCLRSTATES
45- ioctl ! ( readwrite pf_clear_states with b'D' , 18 ; pfvar:: pfioc_state_kill) ;
45+ ioctl_readwrite ! ( pf_clear_states, b'D' , 18 , pfvar:: pfioc_state_kill) ;
4646// DIOCGETSTATUS
47- ioctl ! ( readwrite pf_get_status with b'D' , 21 ; pfvar:: pf_status) ;
47+ ioctl_readwrite ! ( pf_get_status, b'D' , 21 , pfvar:: pf_status) ;
4848// DIOCGETSTATES
49- ioctl ! ( readwrite pf_get_states with b'D' , 25 ; pfvar:: pfioc_states) ;
49+ ioctl_readwrite ! ( pf_get_states, b'D' , 25 , pfvar:: pfioc_states) ;
5050// DIOCCHANGERULE
51- ioctl ! ( readwrite pf_change_rule with b'D' , 26 ; pfvar:: pfioc_rule) ;
51+ ioctl_readwrite ! ( pf_change_rule, b'D' , 26 , pfvar:: pfioc_rule) ;
5252// DIOCINSERTRULE
53- ioctl ! ( readwrite pf_insert_rule with b'D' , 27 ; pfvar:: pfioc_rule) ;
53+ ioctl_readwrite ! ( pf_insert_rule, b'D' , 27 , pfvar:: pfioc_rule) ;
5454// DIOCDELETERULE
55- ioctl ! ( readwrite pf_delete_rule with b'D' , 28 ; pfvar:: pfioc_rule) ;
55+ ioctl_readwrite ! ( pf_delete_rule, b'D' , 28 , pfvar:: pfioc_rule) ;
5656// DIOCKILLSTATES
57- ioctl ! ( readwrite pf_kill_states with b'D' , 41 ; pfvar:: pfioc_state_kill) ;
57+ ioctl_readwrite ! ( pf_kill_states, b'D' , 41 , pfvar:: pfioc_state_kill) ;
5858// DIOCBEGINADDRS
59- ioctl ! ( readwrite pf_begin_addrs with b'D' , 51 ; pfvar:: pfioc_pooladdr) ;
59+ ioctl_readwrite ! ( pf_begin_addrs, b'D' , 51 , pfvar:: pfioc_pooladdr) ;
6060// DIOCADDADDR
61- ioctl ! ( readwrite pf_add_addr with b'D' , 52 ; pfvar:: pfioc_pooladdr) ;
61+ ioctl_readwrite ! ( pf_add_addr, b'D' , 52 , pfvar:: pfioc_pooladdr) ;
6262// DIOCXBEGIN
63- ioctl ! ( readwrite pf_begin_trans with b'D' , 81 ; pfvar:: pfioc_trans) ;
63+ ioctl_readwrite ! ( pf_begin_trans, b'D' , 81 , pfvar:: pfioc_trans) ;
6464// DIOCXCOMMIT
65- ioctl ! ( readwrite pf_commit_trans with b'D' , 82 ; pfvar:: pfioc_trans) ;
65+ ioctl_readwrite ! ( pf_commit_trans, b'D' , 82 , pfvar:: pfioc_trans) ;
0 commit comments