libnl 3.7.0

Attribute Modifications

int rtnl_nat_set_old_addr (struct rtnl_act *act, in_addr_t addr)
 Set old IPv4 address on a netlink NAT action object. More...
 
int rtnl_nat_get_old_addr (struct rtnl_act *act, in_addr_t *addr)
 
int rtnl_nat_set_new_addr (struct rtnl_act *act, in_addr_t addr)
 Set new IPv4 address on a netlink NAT action object. More...
 
int rtnl_nat_get_new_addr (struct rtnl_act *act, in_addr_t *addr)
 
int rtnl_nat_set_mask (struct rtnl_act *act, in_addr_t bitmask)
 Set IPv4 address mask on a netlink NAT action object. More...
 
int rtnl_nat_get_mask (struct rtnl_act *act, in_addr_t *bitmask)
 
int rtnl_nat_set_flags (struct rtnl_act *act, uint32_t flags)
 Set flags for a netlink NAT action object. More...
 
int rtnl_nat_get_flags (struct rtnl_act *act, uint32_t *flags)
 
int rtnl_nat_set_action (struct rtnl_act *act, int action)
 
int rtnl_nat_get_action (struct rtnl_act *act, int *action)
 

Detailed Description

Function Documentation

◆ rtnl_nat_set_old_addr()

int rtnl_nat_set_old_addr ( struct rtnl_act *  act,
in_addr_t  addr 
)

Set old IPv4 address on a netlink NAT action object.

Parameters
actAction object
addrBinary IPv4 address in host byte order
Returns
0 on success or negative error code in case of an error.

Definition at line 112 of file nat.c.

References rtnl_tc_data(), and TC_CAST.

+ Here is the call graph for this function:

◆ rtnl_nat_get_old_addr()

int rtnl_nat_get_old_addr ( struct rtnl_act *  act,
in_addr_t *  addr 
)

Definition at line 124 of file nat.c.

◆ rtnl_nat_set_new_addr()

int rtnl_nat_set_new_addr ( struct rtnl_act *  act,
in_addr_t  addr 
)

Set new IPv4 address on a netlink NAT action object.

Parameters
actAction object
addrBinary IPv4 address in host byte order
Returns
0 on success or negative error code in case of an error.

Definition at line 143 of file nat.c.

References rtnl_tc_data(), and TC_CAST.

+ Here is the call graph for this function:

◆ rtnl_nat_get_new_addr()

int rtnl_nat_get_new_addr ( struct rtnl_act *  act,
in_addr_t *  addr 
)

Definition at line 155 of file nat.c.

◆ rtnl_nat_set_mask()

int rtnl_nat_set_mask ( struct rtnl_act *  act,
in_addr_t  bitmask 
)

Set IPv4 address mask on a netlink NAT action object.

Parameters
actAction object
maskIPv4 address mask
Returns
0 on success or negative error code in case of an error.

Definition at line 174 of file nat.c.

References rtnl_tc_data(), and TC_CAST.

+ Here is the call graph for this function:

◆ rtnl_nat_get_mask()

int rtnl_nat_get_mask ( struct rtnl_act *  act,
in_addr_t *  bitmask 
)

Definition at line 186 of file nat.c.

◆ rtnl_nat_set_flags()

int rtnl_nat_set_flags ( struct rtnl_act *  act,
uint32_t  flags 
)

Set flags for a netlink NAT action object.

Parameters
actAction object
flagsTCA_NAT_FLAG_* flags.

Currently only TCA_NAT_FLAG_EGRESS is defined. Selects NAT on egress/IP src if set, ingress/IP dst otherwise.

Returns
0 on success or negative error code in case of an error.

Definition at line 208 of file nat.c.

References rtnl_tc_data(), and TC_CAST.

+ Here is the call graph for this function:

◆ rtnl_nat_get_flags()

int rtnl_nat_get_flags ( struct rtnl_act *  act,
uint32_t *  flags 
)

Definition at line 220 of file nat.c.

◆ rtnl_nat_set_action()

int rtnl_nat_set_action ( struct rtnl_act *  act,
int  action 
)

Definition at line 232 of file nat.c.

◆ rtnl_nat_get_action()

int rtnl_nat_get_action ( struct rtnl_act *  act,
int *  action 
)

Definition at line 247 of file nat.c.