Commit Graph

41 Commits

Author SHA1 Message Date
53837d7b33 Used cargo fmt 2023-08-05 13:24:09 +01:00
aeae3af5e6 Updated version number in cargo toml 2023-08-05 13:15:13 +01:00
aee8974e2b Made netwrok struct parameters public 2023-08-05 13:11:13 +01:00
f224cf4c29 Added ability to create full networks, including the number of hosts on each as well as the broadcast address for each given network 2023-08-04 11:30:03 +01:00
108f8f2ab4 #5 Update cargo.toml and license to allow for publish to crates.io 2023-05-26 14:20:19 +01:00
00735d5691 #4 Adapated code to contain a lib.rs so can be used as library. Have also updated doctests as they were poorly formatted and did not actually test any of the functionality 2023-05-26 14:04:21 +01:00
30344b0605 Cleaned up some minor issues in main.rs making the final output easier for the end user to read and comprehend 2023-05-15 22:27:54 +01:00
625233ab86 #2 Completed the implementation of create_subnet function, all subnet network addresses are now ALL correctly appended to the vector. Would like to add some more resilient unit testing at some point down the line to verify the accuracy / robustness of the function 2023-05-15 20:26:49 +01:00
8c88d7945a #2 Added IpAddr from u32 function. Finally ready to integrate it into subnet calculation 2023-05-15 19:51:26 +01:00
6a4573450c #2 Made IpAddr to u32 function more efficient by using big endian functions built into rust 2023-05-15 19:35:07 +01:00
4ace257932 #2 Added new function to convert an IPv4 Address to an Unsigned 32-bit interger. Also did some small bits of code cleanup 2023-05-15 19:22:02 +01:00
55ccf05902 Adapted the create_subnet function to itterate through each octet to stop the overflows. There is however still an issue where the actual IP addresses aren't added correctly into the networks list. 2023-05-12 14:17:53 +01:00
924142e96c Bugfix: u8 no longer overflows when there are no borrowed bits. 2023-05-02 07:29:32 +01:00
b8e4ff21b0 Completed first draft of create_subnet() and added additional tests. NOTE: One test is still failing in order to outline the fact that there is still a slight bug in the code 2023-05-02 07:25:05 +01:00
aad67836df create_subnet function now works when the CIDR borrows 8 or less bits, need to figure out a way to have it so that we can modify the other octest sequentially 2023-04-30 14:16:24 +01:00
2dcbd405e4 First draft of subnet generation function. Still not complete, does overflow but I believe it is only small logic changes 2023-04-27 23:28:34 +01:00
cf35765cb4 Further itterations on create_subnet function and relevant tests 2023-04-26 21:44:13 +01:00
6fafa97d61 Made alterations to functions using IP to make it use new functions 2023-04-26 21:19:35 +01:00
d0da5f587f Removed create_subnet function because of incorrect implementation, required network class to be take into account. Added network class and relevant tests 2023-04-25 21:45:43 +01:00
44bafbd0e6 Fnal upload of subnet_calculator before re-write 2023-04-25 20:16:28 +01:00
7f8f2a41fe Corrected use of bitwise or in place of exponent operation 2023-04-24 17:45:59 +01:00
ee116523d8 Started testing create_subnet function. Still WIP!!! 2023-04-20 22:30:33 +01:00
45c5227a19 removed mutability of test variable that is not needed. 2023-04-20 21:57:50 +01:00
3b4a5ce285 Added to_arr and from_arr methods to IpAddr 2023-04-20 21:42:13 +01:00
7d61265f08 Added useful comments to outline create_subnet function 2023-04-18 20:40:53 +01:00
e1a978cb1f Added new functionality to Network and changed error handling to be a single enum. create_subnet() is still WIP 2023-04-17 17:24:35 +01:00
a067a3e349 Created new errors for CIDR / Subnet mask generation 2023-04-10 11:13:36 +01:00
d1d4bc02ca Added function to convert CIDR to subnet mask 2023-04-09 10:07:15 +01:00
edc125d5fc Removed redundant variables 2023-03-06 21:51:47 +00:00
a9bb5c1d52 Moved varialble out of loop to extend scope 2023-03-06 21:42:31 +00:00
41fc1a3f6d Added documentation to ip_and_cidr_from_string() 2023-02-20 21:25:37 +00:00
6567553f8a Created new function to get IP and CIDR from a string independently + test 2023-02-20 18:06:57 +00:00
d792ea8c30 Added CIDR parser -> Really Janky code so will look to review / refactor the method at some point in the very near future 2023-02-13 22:05:33 +00:00
4f8412f3d0 Fixed getting IP address from CLI 2023-02-11 21:22:24 +00:00
f2ad0de89b Tried but can't seem to get Console input (Includes newline character) 2023-02-11 17:41:33 +00:00
43cd0f5bc5 Changed test for IpAddr::from_str() to test more points of failure 2023-02-11 16:49:23 +00:00
d5ec71a000 Added documentation to FromString trait on IpAddr 2023-02-11 16:35:30 +00:00
247587d99b Completed implementation of FromString for IpAddr 2023-02-11 16:15:28 +00:00
2033d9b2b8 Added initial implementation of IpAddr 2023-01-31 20:58:13 +00:00
0f7eb5a102 Initial Upload 2023-01-19 12:30:37 +00:00
a20864a92a Initial commit 2023-01-19 13:26:17 +01:00