|
|
(4 intermediate revisions by one other user not shown) |
Line 4: |
Line 4: |
| ==Features== | | ==Features== |
| ==ToDo== | | ==ToDo== |
| Reorganize network configuration steps.
| | * Modify startup code to: |
| * <strike>User goes to network configuration page (http://localhost:8080/network)</strike> | | ** Read configuration databases |
| * <strike>Generate list of network interfaces that can be configured.</strike> | | ** Test each existing entry against the current hardware configuration |
| ** For each interface, test the network.sqlite database and see if it's already configured. | | *** If they match, start it up using the stored settings |
| ** If it is, change the color of the button corresponding to that interface. | | *** If they don't, delete that stored setting |
| ** Move already configured interfaces to another list? | | ** Start up system services that are configured and active. |
| * <strike>User picks an interface.</strike>
| | * Modify the /index.html template to not show a sitrep but the current configuration from the databases |
| * <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
| | {{Template:Byzantium}} |
| * <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
| |