|
|
Line 4: |
Line 4: |
| ==Features== | | ==Features== |
| ==ToDo== | | ==ToDo== |
| Reorganize network configuration steps. | | *Reorganize network configuration steps. |
| * <strike>User goes to network configuration page (http://localhost:8080/network)</strike> | | *Add SQLite support to the NetworkConfiguration object to store their settings. |
| * <strike>Generate list of network interfaces that can be configured.</strike>
| | *Modify the HTML templates for NetworkConfiguration to change colors depending on whether or not they are configured (i.e., in the database) already). |
| ** For each interface, test the network.sqlite database and see if it's already configured.
| |
| ** If it is, change the color of the button corresponding to that interface.
| |
| ** Move already configured interfaces to another list? | |
| * <strike>User picks an interface.</strike>
| |
| * <strike>If the interface is wired (/eth?/), user moves on to /network/tcpip</strike>
| |
| * If the interface is wireless (/wlan?/), user moves on to /network/wireless
| |
| * <strike>User sets the ESSID of the interface (default: Byzantium) and channel (default: 3)</strike>
| |
| * <strike>User moves on to /network/tcpip</strike>
| |
| * User either
| |
| ** <strike>enters an IP address and netmask</strike>
| |
| ** clicks the "pick a random address button"
| |
| *** note: the random IP address will be from RFC 1918.
| |
| *** note: the user will be advised to choose an RFC 1918 IP address.
| |
| * If the user clicks "random", Network.randomip() is called.
| |
| ** A random integer 1 <= x <= 3 is generated.
| |
| *** 1: 10/8
| |
| **** ip_address[0] = 10
| |
| **** ip_address[1] = Random.randint(1, 254)
| |
| **** ip_address[2] = Random.randint(1, 254)
| |
| **** ip_address[3] = Random.randint(1, 254)
| |
| **** netmask = '255.0.0.0'
| |
| *** 2: 172.16/16
| |
| **** ip_address[2] = Random.randint(1, 254)
| |
| **** ip_address[3] = Random.randint(1, 254)
| |
| **** netmask = '255.255.0.0'
| |
| *** 3: 192.168/24
| |
| **** ip_address[2] = Random.randint(1, 254)
| |
| **** ip_address[3] = Random.randint(1, 254)
| |
| **** netmask = '255.255.255.0'
| |
| ** Note that we don't need cryptographically relevant random values for this. It's overkill. Also, it would deplete the entropy pool used by OpenSSL.
| |
| * Display the user's chosen network configuration. Confirm:
| |
| * If confirmed
| |
| ** Generate string to go into network.sqlite database
| |
| ** run iwconfig on the interface to set the ESSID and channel
| |
| ** run ifconfig on the interface to set the IP address and netmask
| |
| ** check return codes to detect success
| |
| ** add string to network.sqlite database
| |