Name update

This commit is contained in:
Miles Ward
2026-05-06 14:13:38 -04:00
parent e1b7154b51
commit 20c585e3ed
56 changed files with 755 additions and 802 deletions
+3 -3
View File
@@ -1,16 +1,16 @@
[package]
name = "pxeforge-dhcp-proxy"
name = "openpxe-dhcp-proxy"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
description = "DHCP proxy (RFC 4578) for PXEForge — serves boot info, does not lease IPs"
description = "DHCP proxy (RFC 4578) for OpenPXE — serves boot info, does not lease IPs"
[lints]
workspace = true
[dependencies]
pxeforge-core.workspace = true
openpxe-core.workspace = true
tokio.workspace = true
socket2.workspace = true
dhcproto.workspace = true
+1 -1
View File
@@ -9,7 +9,7 @@
//! pass, or the HTTP URL of the boot script once iPXE has chained.
use dhcproto::v4::{DhcpOption, Message, MessageType, Opcode, OptionCode};
use pxeforge_core::{ClientArch, FirmwareClass};
use openpxe_core::{ClientArch, FirmwareClass};
use std::net::Ipv4Addr;
/// Where the reply directs the client next.
+8 -8
View File
@@ -4,7 +4,7 @@
use crate::reply::{build_reply, decide, BootDirective, ReplyContext};
use dhcproto::v4::{DhcpOption, Message, OptionCode};
use dhcproto::{Decodable, Decoder, Encodable, Encoder};
use pxeforge_core::{
use openpxe_core::{
ClientArch, ClientEvent, ClientRegistry, FirmwareClass,
};
use socket2::{Domain, Protocol, Socket, Type};
@@ -19,7 +19,7 @@ pub struct DhcpProxyServer {
our_ip: Ipv4Addr,
public_base_url: String,
clients: Arc<ClientRegistry>,
metrics: pxeforge_core::Metrics,
metrics: openpxe_core::Metrics,
}
impl DhcpProxyServer {
@@ -30,7 +30,7 @@ impl DhcpProxyServer {
our_ip: Ipv4Addr,
public_base_url: String,
clients: Arc<ClientRegistry>,
metrics: pxeforge_core::Metrics,
metrics: openpxe_core::Metrics,
) -> Self {
Self {
bind,
@@ -47,7 +47,7 @@ impl DhcpProxyServer {
let dhcp_sock = bind_udp(self.bind, self.dhcp_port, true)?;
let pxe_sock = bind_udp(self.bind, self.pxe_port, false)?;
tracing::info!(
target: "pxeforge::dhcp",
target: "openpxe::dhcp",
"DHCP proxy listening on {}:{} and :{}",
self.bind, self.dhcp_port, self.pxe_port
);
@@ -67,12 +67,12 @@ impl DhcpProxyServer {
let (n, from) = match sock.recv_from(&mut buf).await {
Ok(v) => v,
Err(e) => {
tracing::warn!(target: "pxeforge::dhcp", port=label, "recv error: {e}");
tracing::warn!(target: "openpxe::dhcp", port=label, "recv error: {e}");
continue;
}
};
if let Err(e) = self.handle_datagram(&sock, &buf[..n], from, label).await {
tracing::warn!(target: "pxeforge::dhcp", port=label, "handle error: {e}");
tracing::warn!(target: "openpxe::dhcp", port=label, "handle error: {e}");
}
}
}
@@ -128,7 +128,7 @@ impl DhcpProxyServer {
if matches!(directive, BootDirective::Ignore) {
self.metrics.record_dhcp_decline();
tracing::debug!(
target: "pxeforge::dhcp",
target: "openpxe::dhcp",
mac=%mac, arch=?arch, "ignoring — no bootfile for arch"
);
return Ok(());
@@ -142,7 +142,7 @@ impl DhcpProxyServer {
let dest = reply_destination(&request, from);
sock.send_to(&out, dest).await?;
tracing::info!(
target: "pxeforge::dhcp",
target: "openpxe::dhcp",
mac=%mac, arch=arch.as_str(), class=?class, dest=%dest, directive=?directive,
"PXE reply sent"
);