Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExttsEvent ¶
type ExttsEvent struct {
Timestamp ptime.Time `json:"timestamp"` // PTP time
TRead time.Time `json:"tRead"` // System time when we read the event
Chan uint32 `json:"chan"` // channel index
Stale bool `json:"stale,omitempty"` // true if timestamp was buffered before reading started
}
ExttsEvent represents a timestamp event (for -i mode)
func (*ExttsEvent) Print ¶
func (e *ExttsEvent) Print(f *os.File)
Print outputs the timestamp in human-readable format
type FlagConfig ¶
type FlagConfig struct {
Mode Mode
JSONL bool
Interface string
// Extts mode flags
Timeout time.Duration
ShowStale bool
// Common pin selection
Pin string // Can be name or index, empty string means not specified
Chan int
// Perout mode parameters
Perout PeroutParams
}
FlagConfig holds the parsed command-line flags and determined mode
type InterfaceInfo ¶
type InterfaceInfo struct {
Name string `json:"name"`
Status string `json:"status"` // Interface status (up/down, carrier/no-carrier)
Driver string `json:"driver"` // Network driver name
PCISlot string `json:"pci_slot,omitempty"` // PCI slot (e.g., "04:00.0")
Vendor string `json:"vendor,omitempty"` // PCI vendor name
Device string `json:"device,omitempty"` // PCI device name
Revision uint32 `json:"revision,omitempty"` // PCI revision
ClockIndex int `json:"clock_index"` // PHC index from ethtool
Pins []string `json:"pins"` // From /sys/class/ptp/ptpX/pins/ directory listing
NumExttsChannels int `json:"n_extts_channels"` // From /sys/class/ptp/ptpX/n_external_timestamps
NumPeroutChannels int `json:"n_perout_channels"` // From /sys/class/ptp/ptpX/n_periodic_outputs
}
InterfaceInfo represents a network interface with PHC (for list mode)
func (*InterfaceInfo) Print ¶
func (info *InterfaceInfo) Print(f *os.File)
Print outputs the interface info in human-readable format
type NoDataError ¶
type NoDataError struct {
// contains filtered or unexported fields
}
NoDataError represents a condition where no data was found (exit code 2)
func (NoDataError) Error ¶
func (e NoDataError) Error() string
func (NoDataError) ExitCode ¶
func (e NoDataError) ExitCode() int
type PeroutParams ¶
type PeroutParams struct {
Width time.Duration // 0 means no duty cycle control
Period time.Duration // defaults to 1 second
}
PeroutParams holds parameters for periodic output mode
Click to show internal directories.
Click to hide internal directories.