netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
police.c File Reference
Include dependency graph for police.c:

Policer Type

char * nl_police2str (int type, char *buf, size_t len)
 Transform a policer type number into a character string (Reentrant). More...
 
int nl_str2police (const char *name)
 Transform a character string into a policer type number. More...
 

Function Documentation

char* nl_police2str ( int  type,
char *  buf,
size_t  len 
)

Transform a policer type number into a character string (Reentrant).

  • type policer type
  • buf destination buffer
  • len buffer length

Transforms a policer type number into a character string and stores it in the provided buffer.

Returns
The destination buffer or the type encoded in hex if no match was found.

References __type2str(), and ARRAY_SIZE.

Here is the call graph for this function:

int nl_str2police ( const char *  name)

Transform a character string into a policer type number.

  • name policer type name

Transform the provided character string specifying a policer type into the corresponding numeric value

Returns
Policer type number or a negative value.

References __str2type(), and ARRAY_SIZE.

Here is the call graph for this function: