Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| summerofcode2020projects:networkconfigurationlibraries [2020/06/07 21:59] – AhsanBarkati | summerofcode2020projects:networkconfigurationlibraries [2021/06/13 19:15] (current) – Formatting fix ChristosMargiolis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Network Configuration Libraries ====== | ====== Network Configuration Libraries ====== | ||
| - | * Student: | + | * Student: [[/ |
| - | * Mentors: | + | * Mentors: |
| - | * [[/ | + | * [[/ |
| - | * [[/ | + | * [[/ |
| + | |||
| + | ===== The Code ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ===== Revisions Submitted ===== | ||
| + | |||
| + | ^ Differential | ||
| + | | [[https:// | ||
| + | | [[https:// | ||
| ===== Project description ===== | ===== Project description ===== | ||
| - | %%FreeBSD%% has high quality tools for management of the network, which includes tools to configure and manage interfaces, the firewalls and more. However these tools are not available as libraries, any software that wishes to incorporate network management must shell out to the command line tools. This limits the range of possible tools for automating control of a %%FreeBSD%% system. The aim of this project is to develop | + | %%FreeBSD%% has high quality tools for management of the network, which includes tools to configure and manage interfaces, the firewalls and more. However these tools are not available as libraries, any software that wishes to incorporate network management must shell out to the command line tools. This limits the range of possible tools for automating control of a %%FreeBSD%% system. The aim of this project is to develop |
| - | ===== Proposed Libraries | + | ===== Libroute |
| - | * libroute: The manual | + | Manual |
| - | * libipfw: Packet filtering is one of the major requirements in most of the network setups. For the purpose of VM and Jail management, NAT (Network Address Translation) functionality | + | ===== Status |
| + | The current status | ||
| + | * It can be used to add, delete, change and get routes for both IPv4 and IPv6. | ||
| + | * There is a bug with the default route addition, I am currently looking into it. | ||
| + | * The man page for libroute can be found [[https:// | ||
| - | ===== Deliverables ===== | + | The general design of libroute is primarily characterized by the use of a handle. The library provides a method to get a libroute handle (via the '' |
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| - | ==== First Evaluation- ==== | + | Example usage of library: |
| - | * libroute | + | < |
| + | #include < | ||
| + | #include <libroute.h> | ||
| - | * Make /sbin/route use the libroute for adding a route. | + | int |
| + | main() | ||
| + | { | ||
| + | rt_handle | ||
| + | struct sockaddr *sa_dest, *sa_gateway; | ||
| + | int defaultfib, error; | ||
| + | |||
| + | | ||
| + | size_t len = sizeof(defaultfib); | ||
| + | sysctlbyname(" | ||
| - | * Regression test for the route add functionality. | + | // Open the libroute handle |
| + | h = libroute_open(defaultfib); | ||
| + | if (h == NULL) | ||
| + | printf(" | ||
| - | ==== Second Evaluation- ==== | + | dest = " |
| - | * libroute containing other functionalities such as flushing, deleting and changing a route. | + | gateway |
| + | |||
| + | // convert addresses to sockaddr structs | ||
| + | sa_dest | ||
| + | sa_gateway = str_to_sockaddr(gateway); | ||
| - | * Make /sbin/route use libroute for the above functionalities. | + | |
| + | error = libroute_add(h, | ||
| + | if (error == -1 ) | ||
| + | printf(" | ||
| - | * Regression tests for the above functionalities of route. | + | libroute_close(h); |
| + | |||
| + | return (0); | ||
| + | } | ||
| + | </ | ||
| - | ==== Final Evaluation- | + | ===== Test Plan ===== |
| - | * libipfw capable of setting up a NAT instance on the specified interface. | + | |
| - | * libipfw capable | + | Currently the testing |
| + | to add tests which directly tests the library. | ||
| - | * Regression tests for the above functionalities of libipfw. | + | ===== Future Work ===== |
| - | ===== The Code ===== | + | ==== Bugs ==== |
| + | * Modification to default route is broken. | ||
| + | * Scope of buffer overflow in '' | ||
| - | https:// | + | ==== Testing ==== |
| + | * A test suite for the library, written in C. | ||
| ===== Useful links ===== | ===== Useful links ===== | ||