package dhcp import "time" // DHCPClient represents a MikroTik RouterOS-style /ip dhcp-client instance. type DHCPClient struct { ID string `json:"id"` Interface string `json:"interface"` Enabled bool `json:"enabled"` AddDefaultRoute bool `json:"add_default_route"` DefaultRouteDistance int `json:"default_route_distance"` UsePeerDNS bool `json:"use_peer_dns"` UsePeerNTP bool `json:"use_peer_ntp"` Comment string `json:"comment"` Status string `json:"status"` // "bound", "searching", "stopped", "disabled", "error" IPAddress string `json:"ip_address"` Gateway string `json:"gateway"` DHCPServer string `json:"dhcp_server"` DNSServers []string `json:"dns_servers"` Domain string `json:"domain"` LeaseTime int `json:"lease_time"` ExpiresIn string `json:"expires_in"` ObtainedAt time.Time `json:"obtained_at"` ExpiresAt time.Time `json:"expires_at"` PID int `json:"pid"` } // CreateDHCPClientRequest specifies parameters when creating a new DHCP client on an interface. type CreateDHCPClientRequest struct { Interface string `json:"interface"` Enabled bool `json:"enabled"` AddDefaultRoute bool `json:"add_default_route"` DefaultRouteDistance int `json:"default_route_distance"` UsePeerDNS bool `json:"use_peer_dns"` UsePeerNTP bool `json:"use_peer_ntp"` Comment string `json:"comment"` } // UpdateDHCPClientRequest allows modifying an existing DHCP client's settings. type UpdateDHCPClientRequest struct { Enabled *bool `json:"enabled,omitempty"` AddDefaultRoute *bool `json:"add_default_route,omitempty"` DefaultRouteDistance *int `json:"default_route_distance,omitempty"` UsePeerDNS *bool `json:"use_peer_dns,omitempty"` UsePeerNTP *bool `json:"use_peer_ntp,omitempty"` Comment *string `json:"comment,omitempty"` } // DHCPSummary provides quick telemetry for badges and KPI cards. type DHCPSummary struct { TotalClients int `json:"total_clients"` BoundClients int `json:"bound_clients"` Searching int `json:"searching"` Disabled int `json:"disabled"` }