func (t RADIUSAttributeType) String() (s string) {
	switch t {
	case RADIUSAttributeTypeUserName:
		s = "User-Name"
	case RADIUSAttributeTypeUserPassword:
		s = "User-Password"
	case RADIUSAttributeTypeCHAPPassword:
		s = "CHAP-Password"
	case RADIUSAttributeTypeNASIPAddress:
		s = "NAS-IP-Address"
	case RADIUSAttributeTypeNASPort:
		s = "NAS-Port"
	case RADIUSAttributeTypeServiceType:
		s = "Service-Type"
	case RADIUSAttributeTypeFramedProtocol:
		s = "Framed-Protocol"
	case RADIUSAttributeTypeFramedIPAddress:
		s = "Framed-IP-Address"
	case RADIUSAttributeTypeFramedIPNetmask:
		s = "Framed-IP-Netmask"
	case RADIUSAttributeTypeFramedRouting:
		s = "Framed-Routing"
	case RADIUSAttributeTypeFilterId:
		s = "Filter-Id"
	case RADIUSAttributeTypeFramedMTU:
		s = "Framed-MTU"
	case RADIUSAttributeTypeFramedCompression:
		s = "Framed-Compression"
	case RADIUSAttributeTypeLoginIPHost:
		s = "Login-IP-Host"
	case RADIUSAttributeTypeLoginService:
		s = "Login-Service"
	case RADIUSAttributeTypeLoginTCPPort:
		s = "Login-TCP-Port"
	case RADIUSAttributeTypeReplyMessage:
		s = "Reply-Message"
	case RADIUSAttributeTypeCallbackNumber:
		s = "Callback-Number"
	case RADIUSAttributeTypeCallbackId:
		s = "Callback-Id"
	case RADIUSAttributeTypeFramedRoute:
		s = "Framed-Route"
	case RADIUSAttributeTypeFramedIPXNetwork:
		s = "Framed-IPX-Network"
	case RADIUSAttributeTypeState:
		s = "State"
	case RADIUSAttributeTypeClass:
		s = "Class"
	case RADIUSAttributeTypeVendorSpecific:
		s = "Vendor-Specific"
	case RADIUSAttributeTypeSessionTimeout:
		s = "Session-Timeout"
	case RADIUSAttributeTypeIdleTimeout:
		s = "Idle-Timeout"
	case RADIUSAttributeTypeTerminationAction:
		s = "Termination-Action"
	case RADIUSAttributeTypeCalledStationId:
		s = "Called-Station-Id"
	case RADIUSAttributeTypeCallingStationId:
		s = "Calling-Station-Id"
	case RADIUSAttributeTypeNASIdentifier:
		s = "NAS-Identifier"
	case RADIUSAttributeTypeProxyState:
		s = "Proxy-State"
	case RADIUSAttributeTypeLoginLATService:
		s = "Login-LAT-Service"
	case RADIUSAttributeTypeLoginLATNode:
		s = "Login-LAT-Node"
	case RADIUSAttributeTypeLoginLATGroup:
		s = "Login-LAT-Group"
	case RADIUSAttributeTypeFramedAppleTalkLink:
		s = "Framed-AppleTalk-Link"
	case RADIUSAttributeTypeFramedAppleTalkNetwork:
		s = "Framed-AppleTalk-Network"
	case RADIUSAttributeTypeFramedAppleTalkZone:
		s = "Framed-AppleTalk-Zone"
	case RADIUSAttributeTypeAcctStatusType:
		s = "Acct-Status-Type"
	case RADIUSAttributeTypeAcctDelayTime:
		s = "Acct-Delay-Time"
	case RADIUSAttributeTypeAcctInputOctets:
		s = "Acct-Input-Octets"
	case RADIUSAttributeTypeAcctOutputOctets:
		s = "Acct-Output-Octets"
	case RADIUSAttributeTypeAcctSessionId:
		s = "Acct-Session-Id"
	case RADIUSAttributeTypeAcctAuthentic:
		s = "Acct-Authentic"
	case RADIUSAttributeTypeAcctSessionTime:
		s = "Acct-Session-Time"
	case RADIUSAttributeTypeAcctInputPackets:
		s = "Acct-Input-Packets"
	case RADIUSAttributeTypeAcctOutputPackets:
		s = "Acct-Output-Packets"
	case RADIUSAttributeTypeAcctTerminateCause:
		s = "Acct-Terminate-Cause"
	case RADIUSAttributeTypeAcctMultiSessionId:
		s = "Acct-Multi-Session-Id"
	case RADIUSAttributeTypeAcctLinkCount:
		s = "Acct-Link-Count"
	case RADIUSAttributeTypeAcctInputGigawords:
		s = "Acct-Input-Gigawords"
	case RADIUSAttributeTypeAcctOutputGigawords:
		s = "Acct-Output-Gigawords"
	case RADIUSAttributeTypeEventTimestamp:
		s = "Event-Timestamp"
	case RADIUSAttributeTypeCHAPChallenge:
		s = "CHAP-Challenge"
	case RADIUSAttributeTypeNASPortType:
		s = "NAS-Port-Type"
	case RADIUSAttributeTypePortLimit:
		s = "Port-Limit"
	case RADIUSAttributeTypeLoginLATPort:
		s = "Login-LAT-Port"
	case RADIUSAttributeTypeTunnelType:
		s = "Tunnel-Type"
	case RADIUSAttributeTypeTunnelMediumType:
		s = "Tunnel-Medium-Type"
	case RADIUSAttributeTypeTunnelClientEndpoint:
		s = "Tunnel-Client-Endpoint"
	case RADIUSAttributeTypeTunnelServerEndpoint:
		s = "Tunnel-Server-Endpoint"
	case RADIUSAttributeTypeAcctTunnelConnection:
		s = "Acct-Tunnel-Connection"
	case RADIUSAttributeTypeTunnelPassword:
		s = "Tunnel-Password"
	case RADIUSAttributeTypeARAPPassword:
		s = "ARAP-Password"
	case RADIUSAttributeTypeARAPFeatures:
		s = "ARAP-Features"
	case RADIUSAttributeTypeARAPZoneAccess:
		s = "ARAP-Zone-Access"
	case RADIUSAttributeTypeARAPSecurity:
		s = "ARAP-Security"
	case RADIUSAttributeTypeARAPSecurityData:
		s = "ARAP-Security-Data"
	case RADIUSAttributeTypePasswordRetry:
		s = "Password-Retry"
	case RADIUSAttributeTypePrompt:
		s = "Prompt"
	case RADIUSAttributeTypeConnectInfo:
		s = "Connect-Info"
	case RADIUSAttributeTypeConfigurationToken:
		s = "Configuration-Token"
	case RADIUSAttributeTypeEAPMessage:
		s = "EAP-Message"
	case RADIUSAttributeTypeMessageAuthenticator:
		s = "Message-Authenticator"
	case RADIUSAttributeTypeTunnelPrivateGroupID:
		s = "Tunnel-Private-Group-ID"
	case RADIUSAttributeTypeTunnelAssignmentID:
		s = "Tunnel-Assignment-ID"
	case RADIUSAttributeTypeTunnelPreference:
		s = "Tunnel-Preference"
	case RADIUSAttributeTypeARAPChallengeResponse:
		s = "ARAP-Challenge-Response"
	case RADIUSAttributeTypeAcctInterimInterval:
		s = "Acct-Interim-Interval"
	case RADIUSAttributeTypeAcctTunnelPacketsLost:
		s = "Acct-Tunnel-Packets-Lost"
	case RADIUSAttributeTypeNASPortId:
		s = "NAS-Port-Id"
	case RADIUSAttributeTypeFramedPool:
		s = "Framed-Pool"
	case RADIUSAttributeTypeTunnelClientAuthID:
		s = "Tunnel-Client-Auth-ID"
	case RADIUSAttributeTypeTunnelServerAuthID:
		s = "Tunnel-Server-Auth-ID"
	default:
		s = fmt.Sprintf("Unknown(%d)", t)
	}
	return
}
String returns a string version of a RADIUSAttributeType.
package layers
import (
	"encoding/binary"
	"fmt"
	"github.com/google/gopacket"
)
const (
	radiusMinimumRecordSizeInBytes int = 20
	radiusMaximumRecordSizeInBytes int = 4096
	radiusAttributesMinimumRecordSizeInBytes int = 2
)
type RADIUS struct {
	BaseLayer
	Code          RADIUSCode
	Identifier    RADIUSIdentifier
	Length        RADIUSLength
	Authenticator RADIUSAuthenticator
	Attributes    []RADIUSAttribute
}
type RADIUSCode uint8
const (
	RADIUSCodeAccessRequest      RADIUSCode = 1    
	RADIUSCodeAccessAccept       RADIUSCode = 2    
	RADIUSCodeAccessReject       RADIUSCode = 3    
	RADIUSCodeAccountingRequest  RADIUSCode = 4    
	RADIUSCodeAccountingResponse RADIUSCode = 5    
	RADIUSCodeAccessChallenge    RADIUSCode = 11   
	RADIUSCodeStatusServer       RADIUSCode = 12   
	RADIUSCodeStatusClient       RADIUSCode = 13   
	RADIUSCodeReserved           RADIUSCode = 255  
)
func (t RADIUSCode) String() (s string) {
	switch t {
	case RADIUSCodeAccessRequest:
		s = "Access-Request"
	case RADIUSCodeAccessAccept:
		s = "Access-Accept"
	case RADIUSCodeAccessReject:
		s = "Access-Reject"
	case RADIUSCodeAccountingRequest:
		s = "Accounting-Request"
	case RADIUSCodeAccountingResponse:
		s = "Accounting-Response"
	case RADIUSCodeAccessChallenge:
		s = "Access-Challenge"
	case RADIUSCodeStatusServer:
		s = "Status-Server"
	case RADIUSCodeStatusClient:
		s = "Status-Client"
	case RADIUSCodeReserved:
		s = "Reserved"
	default:
		s = fmt.Sprintf("Unknown(%d)", t)
	}
	return
}
type RADIUSIdentifier uint8
type RADIUSLength uint16
type RADIUSAuthenticator [16]byte
type RADIUSAttribute struct {
	Type   RADIUSAttributeType
	Length RADIUSAttributeLength
	Value  RADIUSAttributeValue
}
type RADIUSAttributeType uint8
const (
	RADIUSAttributeTypeUserName               RADIUSAttributeType = 1   
	RADIUSAttributeTypeUserPassword           RADIUSAttributeType = 2   
	RADIUSAttributeTypeCHAPPassword           RADIUSAttributeType = 3   
	RADIUSAttributeTypeNASIPAddress           RADIUSAttributeType = 4   
	RADIUSAttributeTypeNASPort                RADIUSAttributeType = 5   
	RADIUSAttributeTypeServiceType            RADIUSAttributeType = 6   
	RADIUSAttributeTypeFramedProtocol         RADIUSAttributeType = 7   
	RADIUSAttributeTypeFramedIPAddress        RADIUSAttributeType = 8   
	RADIUSAttributeTypeFramedIPNetmask        RADIUSAttributeType = 9   
	RADIUSAttributeTypeFramedRouting          RADIUSAttributeType = 10  
	RADIUSAttributeTypeFilterId               RADIUSAttributeType = 11  
	RADIUSAttributeTypeFramedMTU              RADIUSAttributeType = 12  
	RADIUSAttributeTypeFramedCompression      RADIUSAttributeType = 13  
	RADIUSAttributeTypeLoginIPHost            RADIUSAttributeType = 14  
	RADIUSAttributeTypeLoginService           RADIUSAttributeType = 15  
	RADIUSAttributeTypeLoginTCPPort           RADIUSAttributeType = 16  
	RADIUSAttributeTypeReplyMessage           RADIUSAttributeType = 18  
	RADIUSAttributeTypeCallbackNumber         RADIUSAttributeType = 19  
	RADIUSAttributeTypeCallbackId             RADIUSAttributeType = 20  
	RADIUSAttributeTypeFramedRoute            RADIUSAttributeType = 22  
	RADIUSAttributeTypeFramedIPXNetwork       RADIUSAttributeType = 23  
	RADIUSAttributeTypeState                  RADIUSAttributeType = 24  
	RADIUSAttributeTypeClass                  RADIUSAttributeType = 25  
	RADIUSAttributeTypeVendorSpecific         RADIUSAttributeType = 26  
	RADIUSAttributeTypeSessionTimeout         RADIUSAttributeType = 27  
	RADIUSAttributeTypeIdleTimeout            RADIUSAttributeType = 28  
	RADIUSAttributeTypeTerminationAction      RADIUSAttributeType = 29  
	RADIUSAttributeTypeCalledStationId        RADIUSAttributeType = 30  
	RADIUSAttributeTypeCallingStationId       RADIUSAttributeType = 31  
	RADIUSAttributeTypeNASIdentifier          RADIUSAttributeType = 32  
	RADIUSAttributeTypeProxyState             RADIUSAttributeType = 33  
	RADIUSAttributeTypeLoginLATService        RADIUSAttributeType = 34  
	RADIUSAttributeTypeLoginLATNode           RADIUSAttributeType = 35  
	RADIUSAttributeTypeLoginLATGroup          RADIUSAttributeType = 36  
	RADIUSAttributeTypeFramedAppleTalkLink    RADIUSAttributeType = 37  
	RADIUSAttributeTypeFramedAppleTalkNetwork RADIUSAttributeType = 38  
	RADIUSAttributeTypeFramedAppleTalkZone    RADIUSAttributeType = 39  
	RADIUSAttributeTypeAcctStatusType         RADIUSAttributeType = 40  
	RADIUSAttributeTypeAcctDelayTime          RADIUSAttributeType = 41  
	RADIUSAttributeTypeAcctInputOctets        RADIUSAttributeType = 42  
	RADIUSAttributeTypeAcctOutputOctets       RADIUSAttributeType = 43  
	RADIUSAttributeTypeAcctSessionId          RADIUSAttributeType = 44  
	RADIUSAttributeTypeAcctAuthentic          RADIUSAttributeType = 45  
	RADIUSAttributeTypeAcctSessionTime        RADIUSAttributeType = 46  
	RADIUSAttributeTypeAcctInputPackets       RADIUSAttributeType = 47  
	RADIUSAttributeTypeAcctOutputPackets      RADIUSAttributeType = 48  
	RADIUSAttributeTypeAcctTerminateCause     RADIUSAttributeType = 49  
	RADIUSAttributeTypeAcctMultiSessionId     RADIUSAttributeType = 50  
	RADIUSAttributeTypeAcctLinkCount          RADIUSAttributeType = 51  
	RADIUSAttributeTypeAcctInputGigawords     RADIUSAttributeType = 52  
	RADIUSAttributeTypeAcctOutputGigawords    RADIUSAttributeType = 53  
	RADIUSAttributeTypeEventTimestamp         RADIUSAttributeType = 55  
	RADIUSAttributeTypeCHAPChallenge          RADIUSAttributeType = 60  
	RADIUSAttributeTypeNASPortType            RADIUSAttributeType = 61  
	RADIUSAttributeTypePortLimit              RADIUSAttributeType = 62  
	RADIUSAttributeTypeLoginLATPort           RADIUSAttributeType = 63  
	RADIUSAttributeTypeTunnelType             RADIUSAttributeType = 64  
	RADIUSAttributeTypeTunnelMediumType       RADIUSAttributeType = 65  
	RADIUSAttributeTypeTunnelClientEndpoint   RADIUSAttributeType = 66  
	RADIUSAttributeTypeTunnelServerEndpoint   RADIUSAttributeType = 67  
	RADIUSAttributeTypeAcctTunnelConnection   RADIUSAttributeType = 68  
	RADIUSAttributeTypeTunnelPassword         RADIUSAttributeType = 69  
	RADIUSAttributeTypeARAPPassword           RADIUSAttributeType = 70  
	RADIUSAttributeTypeARAPFeatures           RADIUSAttributeType = 71  
	RADIUSAttributeTypeARAPZoneAccess         RADIUSAttributeType = 72  
	RADIUSAttributeTypeARAPSecurity           RADIUSAttributeType = 73  
	RADIUSAttributeTypeARAPSecurityData       RADIUSAttributeType = 74  
	RADIUSAttributeTypePasswordRetry          RADIUSAttributeType = 75  
	RADIUSAttributeTypePrompt                 RADIUSAttributeType = 76  
	RADIUSAttributeTypeConnectInfo            RADIUSAttributeType = 77  
	RADIUSAttributeTypeConfigurationToken     RADIUSAttributeType = 78  
	RADIUSAttributeTypeEAPMessage             RADIUSAttributeType = 79  
	RADIUSAttributeTypeMessageAuthenticator   RADIUSAttributeType = 80  
	RADIUSAttributeTypeTunnelPrivateGroupID   RADIUSAttributeType = 81  
	RADIUSAttributeTypeTunnelAssignmentID     RADIUSAttributeType = 82  
	RADIUSAttributeTypeTunnelPreference       RADIUSAttributeType = 83  
	RADIUSAttributeTypeARAPChallengeResponse  RADIUSAttributeType = 84  
	RADIUSAttributeTypeAcctInterimInterval    RADIUSAttributeType = 85  
	RADIUSAttributeTypeAcctTunnelPacketsLost  RADIUSAttributeType = 86  
	RADIUSAttributeTypeNASPortId              RADIUSAttributeType = 87  
	RADIUSAttributeTypeFramedPool             RADIUSAttributeType = 88  
	RADIUSAttributeTypeTunnelClientAuthID     RADIUSAttributeType = 90  
	RADIUSAttributeTypeTunnelServerAuthID     RADIUSAttributeType = 91  
)
type RADIUSAttributeLength uint8
type RADIUSAttributeValue []byte