function::sa_flags_str - Linux


function::sa_flags_str converts the given NF_SOCKET_ADDR flow types to a string representation.


string function::sa_flags_str(const flow_types::sa_flags_t &sa_flags) noexcept


The following options are available:

  • NF_SA_FLAGS_NONE No special flags.
  • NF_SA_FLAGS_NORECOVERY Use the old recovery semantics.
  • NF_SA_FLAGS_PERMANENT Make this SA permanent.
  • NF_SA_FLAGS_SKIP_HW Don’t offload to the HW.
  • NF_SA_FLAGS_FIXED_HDR Use fixed headers in HW offload.
  • NF_SA_FLAGS_DECRYPTED Don’t encrypt on HW offload.


// Convert flow types to string representation.
string reply = function::sa_flags_str(msg.sa_flags);
cout << reply << endl;

Common Issues

Utilizing an unsupported flag

If a non-existent flag is used, the function will return an empty string.


This function can be utilized with other Linux commands, such as ip and tcpdump, to modify or analyze network traffic.

Related Commands

  • function::saddr_to_str
  • function::daddr_to_str