From 9247a4c0998de14ef5993822cac75b4a6327ee1e Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Mon, 19 Apr 2021 18:05:41 +0200 Subject: Router working finally --- Semestr 4/sieci/pracownia2/router/network_addr.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Semestr 4/sieci/pracownia2/router/network_addr.h') diff --git a/Semestr 4/sieci/pracownia2/router/network_addr.h b/Semestr 4/sieci/pracownia2/router/network_addr.h index 2067e05..616c64f 100644 --- a/Semestr 4/sieci/pracownia2/router/network_addr.h +++ b/Semestr 4/sieci/pracownia2/router/network_addr.h @@ -5,12 +5,9 @@ #include #include -#define INFINITY_DIST 128 - -/* Network address and sitance */ +/* Network address with netmask. */ struct network_addr { struct in_addr addr; - uint16_t distance; uint8_t netmask; }; @@ -23,10 +20,9 @@ struct in_addr get_broadcast_address(struct network_addr na); struct in_addr get_network_address(struct network_addr na); /* Prints network_addr via stdio. */ -void pretty_print(struct network_addr na); +void pretty_print_network(struct network_addr na); /* Converts string of ip in CIDR notation with a netmask to network_addr. */ -struct network_addr stora(char *str); - +struct network_addr stona(char *str); #endif \ No newline at end of file -- cgit v1.2.3