mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-03-13 10:26:06 +00:00
Capitalize the first letter of all log messages throughout the codebase to improve readability and consistency in logging output. Key improvements: - All log messages now start with capital letters - Consistent formatting across all logging statements - Improved readability for debugging and monitoring - Enhanced user experience with better formatted messages Files updated: - CLI commands and service management - Internal client information discovery - Network operations and configuration - DNS resolver and proxy operations - Platform-specific implementations This completes the final phase of the logging improvement project, ensuring all log messages follow consistent capitalization standards for better readability and professional appearance.
35 lines
858 B
Go
35 lines
858 B
Go
//go:build !linux
|
|
|
|
package clientinfo
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"os/exec"
|
|
"runtime"
|
|
)
|
|
|
|
// scan populates NDP table using information from system mappings.
|
|
func (nd *ndpDiscover) scan() {
|
|
switch runtime.GOOS {
|
|
case "windows":
|
|
data, err := exec.Command("netsh", "interface", "ipv6", "show", "neighbors").Output()
|
|
if err != nil {
|
|
nd.logger.Warn().Err(err).Msg("Could not query ndp table")
|
|
return
|
|
}
|
|
nd.scanWindows(bytes.NewReader(data))
|
|
default:
|
|
data, err := exec.Command("ndp", "-an").Output()
|
|
if err != nil {
|
|
nd.logger.Warn().Err(err).Msg("Could not query ndp table")
|
|
return
|
|
}
|
|
nd.scanUnix(bytes.NewReader(data))
|
|
}
|
|
}
|
|
|
|
// subscribe watches NDP table changes and update new information to local table.
|
|
// This is a stub method, and only works on Linux at this moment.
|
|
func (nd *ndpDiscover) subscribe(ctx context.Context) {}
|