#define TC_HANDLE(maj, min) (TC_H_MAJ((maj) << 16) | TC_H_MIN(min))
/* some functions are copied from iproute-tc tool */
-int get_u32(__u32 *val, const char *arg, int base)
+static int get_u32(__u32 *val, const char *arg, int base)
{
unsigned long res;
char *ptr;
return 0;
}
-int get_u32_handle(__u32 *handle, const char *str)
+static int get_u32_handle(__u32 *handle, const char *str)
{
__u32 htid=0, hash=0, nodeid=0;
char *tmp = strchr(str, ':');
return 0;
}
-uint32_t get_u32_parse_handle(const char *cHandle)
+static uint32_t get_u32_parse_handle(const char *cHandle)
{
uint32_t handle=0;
return handle;
}
-int get_tc_classid(__u32 *h, const char *str)
+static int get_tc_classid(__u32 *h, const char *str)
{
__u32 maj, min;
char *p;
* Function that adds a new filter and attach it to a hash table
*
*/
-int u32_add_filter_on_ht(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t prio,
+static int u32_add_filter_on_ht(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t prio,
uint32_t keyval, uint32_t keymask, int keyoff, int keyoffmask,
uint32_t htid, uint32_t classid
)
* and set next hash table link with hash mask
*
*/
-int u32_add_filter_on_ht_with_hashmask(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t prio,
+static int u32_add_filter_on_ht_with_hashmask(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t prio,
uint32_t keyval, uint32_t keymask, int keyoff, int keyoffmask,
uint32_t htid, uint32_t htlink, uint32_t hmask, uint32_t hoffset
)
/*
* function that creates a new hash table
*/
-int u32_add_ht(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t prio, uint32_t htid, uint32_t divisor)
+static int u32_add_ht(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t prio, uint32_t htid, uint32_t divisor)
{
int err;
/*
* function that adds a new HTB qdisc and set the default class for unclassified traffic
*/
-int qdisc_add_HTB(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t defaultClass)
+static int qdisc_add_HTB(struct nl_sock *sock, struct rtnl_link *rtnlLink, uint32_t defaultClass)
{
struct rtnl_qdisc *qdisc;
/*
* function that adds a new HTB class and set its parameters
*/
-int class_add_HTB(struct nl_sock *sock, struct rtnl_link *rtnlLink,
+static int class_add_HTB(struct nl_sock *sock, struct rtnl_link *rtnlLink,
uint32_t parentMaj, uint32_t parentMin,
uint32_t childMaj, uint32_t childMin,
uint64_t rate, uint64_t ceil,
/*
* function that adds a HTB root class and set its parameters
*/
-int class_add_HTB_root(struct nl_sock *sock, struct rtnl_link *rtnlLink,
+static int class_add_HTB_root(struct nl_sock *sock, struct rtnl_link *rtnlLink,
uint64_t rate, uint64_t ceil,
uint32_t burst, uint32_t cburst
)
/*
* function that adds a new SFQ qdisc as a leaf for a HTB class
*/
-int qdisc_add_SFQ_leaf(struct nl_sock *sock, struct rtnl_link *rtnlLink,
+static int qdisc_add_SFQ_leaf(struct nl_sock *sock, struct rtnl_link *rtnlLink,
uint32_t parentMaj, uint32_t parentMin,
int quantum, int limit, int perturb
)