From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- .../pracownia2/franciszek_malinka/dist_vector.h | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 Semestr 4/sieci/pracownia2/franciszek_malinka/dist_vector.h (limited to 'Semestr 4/sieci/pracownia2/franciszek_malinka/dist_vector.h') diff --git a/Semestr 4/sieci/pracownia2/franciszek_malinka/dist_vector.h b/Semestr 4/sieci/pracownia2/franciszek_malinka/dist_vector.h deleted file mode 100644 index 14159b4..0000000 --- a/Semestr 4/sieci/pracownia2/franciszek_malinka/dist_vector.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef DIST_VECTOR_H -#define DIST_VECTOR_H - -#include "linked_list.h" -#include "network_addr.h" -#include "config.h" - -/* Item of the distance vector. - * If <> is set to 0, then it means that the network is reachable. - * If <> has positive value, then it indicates that the network was - * unreachable for <> turns. - */ -struct vector_item { - struct network_addr network; - struct in_addr via_ip; - uint16_t distance; - uint8_t reachable; - bool is_connected_directly; -}; - -/* Initis distance vector with given neighbours array. */ -void init_dv(list_t *dv, int n_cnt, struct network_addr *neighbours); - -/* Returns true if given distance vector item is connected directly, false otherwise. */ -bool is_connected_directly(struct vector_item item); - -/* Updates the distance vector. */ -void update_dv_new_item(list_t *distance_vector, struct vector_item new_item); - -/* Updates reachabilities. */ -void update_dv_reachability(list_t *distance_vector); - -/* Print distance vector. */ -void print_dv(list_t *distance_vector); - -#endif \ No newline at end of file -- cgit v1.2.3