rfc1024.txt
来自「<VC++网络游戏建摸与实现>源代码」· 文本 代码 · 共 2,101 行 · 第 1/5 页
TXT
2,101 行
101 -- System error. The query processor has failed in some way. 102 -- Format error. An error has been detected in the input stream. 103 -- Stack error. A stack overflow or underflow has occurred. 104 -- Instruction error. The instruction is either unknown, or not supported on the object to which it has been applied. 105 -- Operand error. The wrong number of operands or inappropriate operands have been given to an instruction.Partridge & Trewitt [Page 8]RFC 1024 HEMS Definitions October 1987 TYPE: Counter Counter ::= [APPLICATION 4] IMPLICIT INTEGER The Counter type is an unsigned integer which is defined to roll-over to 0 when incremented past a certain value. (The roll-over point may be found by examining the attributes for the particular counter.) Counter sizes should be chosen such that the counters will not roll over more than once every 24 hours. TYPE: InstructionGroup InstructionGroup ::= [APPLICATION 5] IMPLICIT SEQUENCE of ANY An InstructionGroup is an encapsulated sequence of operands and operations. It allows applications to encode queries as objects. TYPE: Histogram Histogram ::= SET of HistEntry HistEntry ::= SEQUENCE { histValue INTEGER, histCount Counter } A Histogram associates a count, histCount, with a numeric value, histValue. No meaning is placed on the count or value by this definition. Each HistEntry may represent a simple map (e.g., histCount instances of histValue), or a more complex relationship (e.g., a count of all values between this histValue and the next lowest histValue in the Histogram). The meaning of the particular Histogram is given in the object definition. TYPE: TrafficMatrix TrafficMatrix ::= SET of TrafficEntry TrafficEntry ::= SEQUENCE { src IpAddress, dst IpAddress, count Counter } A TrafficMatrix measures traffic observed between two IP addresses. Typically it is used to count packets flowing through a gateway.Partridge & Trewitt [Page 9]RFC 1024 HEMS Definitions October 1987 TYPE: IpAddress IpAddress ::= OCTETSTRING The 4 octet IP address. If the length of the string is less than 4 then the missing octets are wildcarded. A zero length string is a default address (e.g., for indicating default routes). TYPE: Fraction Fraction ::= INTEGER A Fraction is an integer representation of a fractional value. It contains the numerator of a value as expressed over 256. (For example dividing the Fraction by 256 gives the fractional value.) TYPE: BootClock BootClock ::= INTEGER The time in milliseconds since the machine was last booted or reset. This value is always defined. TYPE: localClock LocalClock ::= INTEGER The local system clock, measured in milliseconds since 00:00 1 January 1900 UTC. Assumed to be only a local estimate of the time. The value 0 is reserved for an uninitialized clock (For example, an uninitialized time-of-day chip.) TYPE: NetClock NetClock ::= INTEGER A network synchronized clock, which is assumed to be synchronized across some part of a network. The clock value is measured in milliseconds since 00:00 1 January 1900 UTC. Specific information about the synchronization protocol is found in the system variable dictionary. The value 0 is used to indicate an uninitialized clock. TYPE: TimeStamp TimeStamp ::= CHOICE { [0] BootClockPartridge & Trewitt [Page 10]RFC 1024 HEMS Definitions October 1987 [1] localClock [2] NetClock } A TimeStamp, which was taken from the boot clock, system clock or the synchronized clock. In general, a time of day is preferred to the time since boot, and a synchronized clock is preferred to an unsynchronized clock. It is more useful to know that an event occurred at a particular time, than that it happened so many milliseconds after the machine booted.OBJECT DEFINITIONSThe Root Dictionary In HEMS, all data is stored in dictionaries, where a dictionary is thought to represent a conceptual grouping of values. The top-level dictionary is the root dictionary. The form of the root dictionary for is shown below. RootDictionary ::= [APPLICATION 32] IMPLICIT SET { SystemVariables, EventControls OPTIONAL, Interfaces, IpNetworkLayer, IpRoutingTable, IpTransportLayer, IpApplications OPTIONAL }The root dictionary is split into seven general dictionaries: - SystemVariables, which stores general system values such as the system clock, machine memory and system up/down status. - EventControls, which stores all objects necessary to observe and control the event generating mechanism in entities which support events. - interfaces, which contains all information on all the network interfaces and IP to physical address maps (ARP tables, X.25 Standard mappings, etc). - IpNetworkLayer, which contains information about the workings of the IP layer. This includes information such as routing tables, general packet counts, and host-trafficPartridge & Trewitt [Page 11]RFC 1024 HEMS Definitions October 1987 matrices. - IpRoutingTable, which contains information on how the machine routes packets. It proved more useful to segregate routing information than to keep it stored with the network layer data. - IpTransportLayer, which stores information on the transport protocols that the entity supports. - IpApplications, which may store information about various internet applications such as the domain system. This section is not required of HEMS entities. The next several sections define the values stored in the five dictionaries.The SystemVariables Dictionary The SystemVariables dictionary stores objects which are not strictly protocol, network, or application specific. Such objects include values such as the machine load, clocks and the processor status. The form of the dictionary is shown below. SystemVariables ::= [APPLICATION 33] IMPLICIT SET { referenceClock [0] IMPLICIT TimeStamp, netClockInfo [1] IMPLICIT SET OPTIONAL, processorLoad [2] IMPLICIT INTEGER, entityState [3] IMPLICIT INTEGER, kernelMemory [4] IMPLICIT OCTETSTRING OPTIONAL, pktBuffers [5] IMPLICIT INTEGER OPTIONAL, pktOctets [6] IMPLICIT INTEGER OPTIONAL, pktBuffersFree [7] IMPLICIT INTEGER OPTIONAL, pktOctetsFree [8] IMPLICIT INTEGER OPTIONAL systemID [9] IMPLICIT IA5STRING, } OBJECT: SystemVariables Type: SET Definition: see above The objects in the dictionary are defined below. OBJECT: referenceClockPartridge & Trewitt [Page 12]RFC 1024 HEMS Definitions October 1987 Type: TimeStamp Definition: The system clock used for placing timestamps on information. Use of a NetClock is encouraged. Operations on Object: Defaults. Notes: Cross-network clock adjustment is best handled by a proper time synchronization protocol, not through the use of SET. OBJECT: netClockInfo Type: SET Definition: Detailed information on the referenceClock if the referenceClock is a NetClock. The format of this information is shown below. netClockInfo ::= [1] IMPLICIT SET { estError INTEGER, refClockType INTEGER { unspecified(0), primary-reference(1), ntp-secondary-reference(2), secondary-reference(3), wristwatch(4) } } The estError is the estimated error in milliseconds. The refClockType is a value indicating the type of reference clock consulted for network time (the values are taken directly from the Network Time Protocol specification, RFC-958). Object Status: Required if the referenceClock is a NetClock. OBJECT: processorLoad Type: Fraction Definition: A value, expressed as a Fraction, which indicates the current processing load on the entity. A value of 256 (= 1.0) is defined to be running at capacity. It is recognized that this is an imprecise definition since capacity can be measured in several ways. For example, a multiprocessor may still have plenty of capacity even if one processor is running at capacity,Partridge & Trewitt [Page 13]RFC 1024 HEMS Definitions October 1987 or it may be at capacity because that processor is the master processor and handles all context switching. The idea is for remote applications to be able to get some sense of the current workload on the entity. Also note that the time scale of the measurement should be small. A load measure that averages over the past 10 seconds is acceptable but a load measure that averages over the past 10 minutes is not. Implementors should chose some mapping between system load and this scale such that 256 represents a machine under severe strain. (Note that this suggests that values greater than 256 may be returned in rare cases.) OBJECT: entityState Type: INTEGER Definition: An object which indicates the system state. There are several defined object values. Some values are read-only and can only be read from the object. Over values are write-only and will never be read from the object. Over values are write-only and will never be read from the object.The values are: The read-only values are: (0) -- reserved. (1) -- running. The entity is up and running. (2) -- testing. The entity is running some sort of diagnostics which may affect its network operation. The write-only values are: (0) -- reserved. (1) -- reset the entity. (2) -- reboot the entity. This value is assumed to cause a more aggressive recycling of the system than reset, though this need not be the case. (3) -- halt the entity. This value stops the entity. It assumed to prevent the entity from operating until it is manually restarted. (I.e. the halt takes the machine off the network).Partridge & Trewitt [Page 14]RFC 1024 HEMS Definitions October 1987 Note: The ability to change an entity's state requires very strong access controls. Operations on Object: The defaults except as noted below. SET: Optionally writes the value into the object. The message requesting the SET must be authenticated. SET-MATCH: Optionally writes the value into the object if the current value is matched. OBJECT: kernelMemory Type: OCTETSTRING Definition: A sequence of octets which represents the image of the kernel software running on the entity. This facility is provided to allow remote network debugging. By kernel software, we mean that software which controls the operations and access to the hardware. In particular, the kernel is expected to contain all network software up through the IP layer. Implementations which use lightweight processes or segmented images should consider providing some way to map their internal representation into a single contiguous stream of octets. Note: Access control is required to read this object. Object Status: Useful. Operations on Object: The defaults except as noted below. GET-RANGE: Emits the section of memory specified. GET: Emits all of memory, but note that a GET on the system dictionary should *not* emit this object. OBJECT: pktBuffers Type: INTEGER Definition: The total number of packet buffers in the entity. Object Status: Required if the entity has a maximum number of buffers. Note that most entities do have a limit (even if itPartridge & Trewitt [Page 15]RFC 1024 HEMS Definitions October 1987 is for practical purposes, near infinite) and should return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?