|
@@ -67,7 +67,7 @@ static struct tt_local_entry *tt_local_hash_find(struct bat_priv *bat_priv,
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
struct hlist_node *node;
|
|
struct hlist_node *node;
|
|
struct tt_local_entry *tt_local_entry, *tt_local_entry_tmp = NULL;
|
|
struct tt_local_entry *tt_local_entry, *tt_local_entry_tmp = NULL;
|
|
- int index;
|
|
|
|
|
|
+ uint32_t index;
|
|
|
|
|
|
if (!hash)
|
|
if (!hash)
|
|
return NULL;
|
|
return NULL;
|
|
@@ -99,7 +99,7 @@ static struct tt_global_entry *tt_global_hash_find(struct bat_priv *bat_priv,
|
|
struct hlist_node *node;
|
|
struct hlist_node *node;
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct tt_global_entry *tt_global_entry_tmp = NULL;
|
|
struct tt_global_entry *tt_global_entry_tmp = NULL;
|
|
- int index;
|
|
|
|
|
|
+ uint32_t index;
|
|
|
|
|
|
if (!hash)
|
|
if (!hash)
|
|
return NULL;
|
|
return NULL;
|
|
@@ -316,7 +316,8 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset)
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
size_t buf_size, pos;
|
|
size_t buf_size, pos;
|
|
char *buff;
|
|
char *buff;
|
|
- int i, ret = 0;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
+ int ret = 0;
|
|
|
|
|
|
primary_if = primary_if_get_selected(bat_priv);
|
|
primary_if = primary_if_get_selected(bat_priv);
|
|
if (!primary_if) {
|
|
if (!primary_if) {
|
|
@@ -427,7 +428,7 @@ static void tt_local_purge(struct bat_priv *bat_priv)
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
spinlock_t *list_lock; /* protects write access to the hash lists */
|
|
spinlock_t *list_lock; /* protects write access to the hash lists */
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
|
|
for (i = 0; i < hash->size; i++) {
|
|
for (i = 0; i < hash->size; i++) {
|
|
head = &hash->table[i];
|
|
head = &hash->table[i];
|
|
@@ -465,7 +466,7 @@ static void tt_local_table_free(struct bat_priv *bat_priv)
|
|
struct tt_local_entry *tt_local_entry;
|
|
struct tt_local_entry *tt_local_entry;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
|
|
if (!bat_priv->tt_local_hash)
|
|
if (!bat_priv->tt_local_hash)
|
|
return;
|
|
return;
|
|
@@ -592,7 +593,8 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
size_t buf_size, pos;
|
|
size_t buf_size, pos;
|
|
char *buff;
|
|
char *buff;
|
|
- int i, ret = 0;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
+ int ret = 0;
|
|
|
|
|
|
primary_if = primary_if_get_selected(bat_priv);
|
|
primary_if = primary_if_get_selected(bat_priv);
|
|
if (!primary_if) {
|
|
if (!primary_if) {
|
|
@@ -716,7 +718,7 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
|
|
struct orig_node *orig_node, const char *message)
|
|
struct orig_node *orig_node, const char *message)
|
|
{
|
|
{
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct tt_global_entry *tt_global_entry;
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
struct hashtable_t *hash = bat_priv->tt_global_hash;
|
|
struct hashtable_t *hash = bat_priv->tt_global_hash;
|
|
struct hlist_node *node, *safe;
|
|
struct hlist_node *node, *safe;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
@@ -755,7 +757,7 @@ static void tt_global_roam_purge(struct bat_priv *bat_priv)
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
spinlock_t *list_lock; /* protects write access to the hash lists */
|
|
spinlock_t *list_lock; /* protects write access to the hash lists */
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
|
|
for (i = 0; i < hash->size; i++) {
|
|
for (i = 0; i < hash->size; i++) {
|
|
head = &hash->table[i];
|
|
head = &hash->table[i];
|
|
@@ -789,7 +791,7 @@ static void tt_global_table_free(struct bat_priv *bat_priv)
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
|
|
if (!bat_priv->tt_global_hash)
|
|
if (!bat_priv->tt_global_hash)
|
|
return;
|
|
return;
|
|
@@ -875,7 +877,8 @@ uint16_t tt_global_crc(struct bat_priv *bat_priv, struct orig_node *orig_node)
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct tt_global_entry *tt_global_entry;
|
|
struct hlist_node *node;
|
|
struct hlist_node *node;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
- int i, j;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
+ int j;
|
|
|
|
|
|
for (i = 0; i < hash->size; i++) {
|
|
for (i = 0; i < hash->size; i++) {
|
|
head = &hash->table[i];
|
|
head = &hash->table[i];
|
|
@@ -912,7 +915,8 @@ uint16_t tt_local_crc(struct bat_priv *bat_priv)
|
|
struct tt_local_entry *tt_local_entry;
|
|
struct tt_local_entry *tt_local_entry;
|
|
struct hlist_node *node;
|
|
struct hlist_node *node;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
- int i, j;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
+ int j;
|
|
|
|
|
|
for (i = 0; i < hash->size; i++) {
|
|
for (i = 0; i < hash->size; i++) {
|
|
head = &hash->table[i];
|
|
head = &hash->table[i];
|
|
@@ -1049,7 +1053,7 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
|
|
struct sk_buff *skb = NULL;
|
|
struct sk_buff *skb = NULL;
|
|
uint16_t tt_tot, tt_count;
|
|
uint16_t tt_tot, tt_count;
|
|
ssize_t tt_query_size = sizeof(struct tt_query_packet);
|
|
ssize_t tt_query_size = sizeof(struct tt_query_packet);
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
|
|
if (tt_query_size + tt_len > primary_if->soft_iface->mtu) {
|
|
if (tt_query_size + tt_len > primary_if->soft_iface->mtu) {
|
|
tt_len = primary_if->soft_iface->mtu - tt_query_size;
|
|
tt_len = primary_if->soft_iface->mtu - tt_query_size;
|
|
@@ -1726,7 +1730,7 @@ void tt_free(struct bat_priv *bat_priv)
|
|
* entry */
|
|
* entry */
|
|
static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
|
|
static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
|
|
{
|
|
{
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
struct hashtable_t *hash = bat_priv->tt_local_hash;
|
|
struct hashtable_t *hash = bat_priv->tt_local_hash;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
struct hlist_node *node;
|
|
struct hlist_node *node;
|
|
@@ -1759,7 +1763,7 @@ static void tt_local_purge_pending_clients(struct bat_priv *bat_priv)
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_node *node, *node_tmp;
|
|
struct hlist_head *head;
|
|
struct hlist_head *head;
|
|
spinlock_t *list_lock; /* protects write access to the hash lists */
|
|
spinlock_t *list_lock; /* protects write access to the hash lists */
|
|
- int i;
|
|
|
|
|
|
+ uint32_t i;
|
|
|
|
|
|
if (!hash)
|
|
if (!hash)
|
|
return;
|
|
return;
|