diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 87ea283..3d86a8e 100644 --- a/src/main.rs +++ b/src/main.rs | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | #![feature(cursor_split)] | ||
| 2 | pub mod dhcp; | ||
| 3 | pub mod tftp; | ||
| 4 | pub mod wire; | ||
| 5 | |||
| 1 | use std::io::{BufRead, Cursor, Read, Result, Write}; | 6 | use std::io::{BufRead, Cursor, Read, Result, Write}; |
| 2 | use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, UdpSocket}; | 7 | use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, UdpSocket}; |
| 3 | 8 | ||
| @@ -15,7 +20,7 @@ const MAGIC_COOKIE: [u8; 4] = [0x63, 0x82, 0x53, 0x63]; | |||
| 15 | const BOOT_FILE_NAME: &[u8] = b"ipxe.efi"; | 20 | const BOOT_FILE_NAME: &[u8] = b"ipxe.efi"; |
| 16 | const BOOT_FILE_NAME_IPXE: &[u8] = b"test.ipxe"; | 21 | const BOOT_FILE_NAME_IPXE: &[u8] = b"test.ipxe"; |
| 17 | 22 | ||
| 18 | const LOCAL_IPV4: Ipv4Addr = Ipv4Addr::new(192, 168, 2, 184); | 23 | const LOCAL_IPV4: Ipv4Addr = Ipv4Addr::new(192, 168, 1, 100); |
| 19 | 24 | ||
| 20 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 25 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
| 21 | enum BootOp { | 26 | enum BootOp { |
