MCPcopy Create free account
hub / github.com/facebook/time / String

Method String

ntp/protocol/extension_fields.go:137–150  ·  view source on GitHub ↗

String returns the IANA-registered name for known NTP extension field types and "Unknown(0xXXXX)" otherwise. See RFC 8915 §5 and the IANA "NTP Extension Field Types" registry.

()

Source from the content-addressed store, hash-verified

135 return MarshalExtensionFields([]ExtensionField{ef})
136}
137
138// String returns the IANA-registered name for known NTP extension field
139// types and "Unknown(0xXXXX)" otherwise. See RFC 8915 §5 and the IANA "NTP Extension
140// Field Types" registry.
141func (t ExtensionFieldType) String() string {
142 switch t {
143 case UniqueIdentifier:
144 return "Unique Identifier"
145 case NTSCookie:
146 return "NTS Cookie"
147 case NTSCookiePlaceholder:
148 return "NTS Cookie Placeholder"
149 case NTSAuthenticator:
150 return "NTS Authenticator and Encrypted Extension Fields"
151 default:
152 return fmt.Sprintf("Unknown(0x%04x)", uint16(t))
153 }

Calls

no outgoing calls