Files
smartradius/ts_shared/enums.ts

223 lines
4.0 KiB
TypeScript

/**
* RADIUS Protocol Enums
* Based on RFC 2865 (Authentication) and RFC 2866 (Accounting)
*/
/**
* RADIUS Packet Codes (RFC 2865 Section 3)
*/
export enum ERadiusCode {
AccessRequest = 1,
AccessAccept = 2,
AccessReject = 3,
AccountingRequest = 4,
AccountingResponse = 5,
AccessChallenge = 11,
StatusServer = 12, // Experimental
StatusClient = 13, // Experimental
}
/**
* RADIUS Attribute Types (RFC 2865 Section 5)
*/
export enum ERadiusAttributeType {
UserName = 1,
UserPassword = 2,
ChapPassword = 3,
NasIpAddress = 4,
NasPort = 5,
ServiceType = 6,
FramedProtocol = 7,
FramedIpAddress = 8,
FramedIpNetmask = 9,
FramedRouting = 10,
FilterId = 11,
FramedMtu = 12,
FramedCompression = 13,
LoginIpHost = 14,
LoginService = 15,
LoginTcpPort = 16,
ReplyMessage = 18,
CallbackNumber = 19,
CallbackId = 20,
FramedRoute = 22,
FramedIpxNetwork = 23,
State = 24,
Class = 25,
VendorSpecific = 26,
SessionTimeout = 27,
IdleTimeout = 28,
TerminationAction = 29,
CalledStationId = 30,
CallingStationId = 31,
NasIdentifier = 32,
ProxyState = 33,
LoginLatService = 34,
LoginLatNode = 35,
LoginLatGroup = 36,
FramedAppleTalkLink = 37,
FramedAppleTalkNetwork = 38,
FramedAppleTalkZone = 39,
ChapChallenge = 60,
NasPortType = 61,
PortLimit = 62,
LoginLatPort = 63,
// Accounting attributes (RFC 2866)
AcctStatusType = 40,
AcctDelayTime = 41,
AcctInputOctets = 42,
AcctOutputOctets = 43,
AcctSessionId = 44,
AcctAuthentic = 45,
AcctSessionTime = 46,
AcctInputPackets = 47,
AcctOutputPackets = 48,
AcctTerminateCause = 49,
AcctMultiSessionId = 50,
AcctLinkCount = 51,
// EAP support
EapMessage = 79,
MessageAuthenticator = 80,
}
/**
* Service-Type values (RFC 2865 Section 5.6)
*/
export enum EServiceType {
Login = 1,
Framed = 2,
CallbackLogin = 3,
CallbackFramed = 4,
Outbound = 5,
Administrative = 6,
NasPrompt = 7,
AuthenticateOnly = 8,
CallbackNasPrompt = 9,
CallCheck = 10,
CallbackAdministrative = 11,
}
/**
* Framed-Protocol values (RFC 2865 Section 5.7)
*/
export enum EFramedProtocol {
Ppp = 1,
Slip = 2,
Arap = 3,
Gandalf = 4,
Xylogics = 5,
X75 = 6,
}
/**
* Framed-Routing values (RFC 2865 Section 5.10)
*/
export enum EFramedRouting {
None = 0,
Send = 1,
Listen = 2,
SendAndListen = 3,
}
/**
* Framed-Compression values (RFC 2865 Section 5.13)
*/
export enum EFramedCompression {
None = 0,
VjTcpIp = 1,
IpxHeaderCompression = 2,
StacLzs = 3,
}
/**
* Login-Service values (RFC 2865 Section 5.15)
*/
export enum ELoginService {
Telnet = 0,
Rlogin = 1,
TcpClear = 2,
PortMaster = 3,
Lat = 4,
X25Pad = 5,
X25T3Pos = 6,
TcpClearQuiet = 8,
}
/**
* Termination-Action values (RFC 2865 Section 5.29)
*/
export enum ETerminationAction {
Default = 0,
RadiusRequest = 1,
}
/**
* NAS-Port-Type values (RFC 2865 Section 5.41)
*/
export enum ENasPortType {
Async = 0,
Sync = 1,
IsdnSync = 2,
IsdnAsyncV120 = 3,
IsdnAsyncV110 = 4,
Virtual = 5,
Piafs = 6,
HdlcClearChannel = 7,
X25 = 8,
X75 = 9,
G3Fax = 10,
Sdsl = 11,
AdslCap = 12,
AdslDmt = 13,
Idsl = 14,
Ethernet = 15,
Xdsl = 16,
Cable = 17,
WirelessOther = 18,
WirelessIeee80211 = 19,
}
/**
* Acct-Status-Type values (RFC 2866 Section 5.1)
*/
export enum EAcctStatusType {
Start = 1,
Stop = 2,
InterimUpdate = 3,
AccountingOn = 7,
AccountingOff = 8,
}
/**
* Acct-Authentic values (RFC 2866 Section 5.6)
*/
export enum EAcctAuthentic {
Radius = 1,
Local = 2,
Remote = 3,
}
/**
* Acct-Terminate-Cause values (RFC 2866 Section 5.10)
*/
export enum EAcctTerminateCause {
UserRequest = 1,
LostCarrier = 2,
LostService = 3,
IdleTimeout = 4,
SessionTimeout = 5,
AdminReset = 6,
AdminReboot = 7,
PortError = 8,
NasError = 9,
NasRequest = 10,
NasReboot = 11,
PortUnneeded = 12,
PortPreempted = 13,
PortSuspended = 14,
ServiceUnavailable = 15,
Callback = 16,
UserError = 17,
HostRequest = 18,
}