Lines Matching defs:gateway

74  * batadv_gw_get_selected_gw_node() - Get currently selected gateway
77 * Return: selected gateway (with increased refcnt), NULL on errors
98 * batadv_gw_get_selected_orig() - Get originator of currently selected gateway
101 * Return: orig_node of selected gateway (with increased refcnt), NULL on errors
149 * batadv_gw_reselect() - force a gateway reselection
152 * Set a flag to remind the GW component to perform a new gateway reselection.
153 * However this function does not ensure that the current gateway is going to be
154 * deselected. The reselection mechanism may elect the same gateway once again.
156 * This means that invoking batadv_gw_reselect() does not guarantee a gateway
183 /* deselect the current gateway so that next time that client mode is
188 /* if batman-adv is switching the gw client mode off and a gateway was
197 * batadv_gw_election() - Elect the best gateway
248 "Removing selected gateway - no gateway in range\n");
253 "Adding route to gateway %pM (bandwidth: %u.%u/%u.%u MBit, tq: %i)\n",
264 "Changing route to gateway %pM (bandwidth: %u.%u/%u.%u MBit, tq: %i)\n",
289 * batadv_gw_check_election() - Elect orig node as best gateway when eligible
298 /* abort immediately if the routing algorithm does not support gateway
308 /* this node already is the gateway */
324 * batadv_gw_node_add() - add gateway node to list of available gateways
326 * @orig_node: originator announcing gateway capabilities
327 * @gateway: announced bandwidth information
334 struct batadv_tvlv_gateway_data *gateway)
340 if (gateway->bandwidth_down == 0)
351 gw_node->bandwidth_down = ntohl(gateway->bandwidth_down);
352 gw_node->bandwidth_up = ntohl(gateway->bandwidth_up);
359 "Found new gateway %pM -> gw bandwidth: %u.%u/%u.%u MBit\n",
361 ntohl(gateway->bandwidth_down) / 10,
362 ntohl(gateway->bandwidth_down) % 10,
363 ntohl(gateway->bandwidth_up) / 10,
364 ntohl(gateway->bandwidth_up) % 10);
371 * batadv_gw_node_get() - retrieve gateway node from list of available gateways
373 * @orig_node: originator announcing gateway capabilities
375 * Return: gateway node if found or NULL otherwise.
403 * @orig_node: originator announcing gateway capabilities
404 * @gateway: announced bandwidth information
408 struct batadv_tvlv_gateway_data *gateway)
415 batadv_gw_node_add(bat_priv, orig_node, gateway);
421 if (gw_node->bandwidth_down == ntohl(gateway->bandwidth_down) &&
422 gw_node->bandwidth_up == ntohl(gateway->bandwidth_up))
432 ntohl(gateway->bandwidth_down) / 10,
433 ntohl(gateway->bandwidth_down) % 10,
434 ntohl(gateway->bandwidth_up) / 10,
435 ntohl(gateway->bandwidth_up) % 10);
437 gw_node->bandwidth_down = ntohl(gateway->bandwidth_down);
438 gw_node->bandwidth_up = ntohl(gateway->bandwidth_up);
440 if (ntohl(gateway->bandwidth_down) == 0) {
442 "Gateway %pM removed from gateway list\n",
470 * batadv_gw_node_delete() - Remove orig_node from gateway list
477 struct batadv_tvlv_gateway_data gateway;
479 gateway.bandwidth_down = 0;
480 gateway.bandwidth_up = 0;
482 batadv_gw_node_update(bat_priv, orig_node, &gateway);
486 * batadv_gw_node_free() - Free gateway information from soft interface
507 * batadv_gw_client_seq_print_text() - Print the gateway table in a seq file
718 * gateway
772 /* packet is going to our gateway */