| v2.x | v3.x | v4.x | v5.x |
Request
Offset Content Type (request header) 6 FunctionCode (114) byte 7 SubFuncStrucLen (1) word (Hi-Lo) 9 SubFuncCode (01) byte
Reply
Offset Content Type (reply header) 8 theTime (see below) long[3] 20 eventOffset int64 28 eventTime long 32 eventParm void *
Completion Code
0 0x00 Successful 126 0x7E NCP Boundary Check Failed 251 0xFB Invalid Subfunction Request
Remarks
This NCP gets time from the server. This NCP is used by the newer Novell Clients to get the server's time and then update the workstations time. It replaces the NCP 20 functionality (not used by our current clients anymore).
Call this routine to get the current clock and status and the information about any scheduled network event.
The time that is returned is UTC time. It is the number of seconds from January 1, 1970.
The "theTime" reply field is defined as: typedef LONG clockAndStatus[3]; All three longs should be long swapped. The first long is the UTC Time in Seconds. It is the number of seconds from January 1, 1970. (ex. Mon Sep 04 2000 18:10:01) The second long is the Fractional Seconds. The third long is the Timesync Status Flags: CLOCK_IS_SYNCHRONIZED 0x00000001 CLOCK_IS_NETWORK_SYNCHRONIZED 0x00000002 CLOCK_SYNCHRONIZATION_IS_ACTIVE 0x00000004 CLOCK_EXTERNAL_SYNC_ACTIVE 0x00000008 SERVER_TYPE_UNKNOWN 0x00000000 SERVER_TYPE_CLIENT 0x00000100 SERVER_TYPE_SECONDARY 0x00000200 SERVER_TYPE_PRIMARY 0x00000300 SERVER_TYPE_REFERENCE 0x00000400 SERVER_TYPE_SINGLE_SERVER 0x00000500 CLOCK_STATUS_EXTRN_SYNC_TYPE 0x000F0000
Note that the eventOffset reply field is defined as a 64 bit field.
It looks like that the eventTime field gets set to 0xffffffff if the synchronization request has been fulfilled and nothing more needs to be done with it. If the field is not 0xffffffff, then the sync needs to be done. It looks like in the timesync code that eventParm field, it always gets zeroed out.
| v2.x | v3.x | v4.x | v5.x |
Request
Offset Content Type (request header) 6 FunctionCode (114) byte 7 SubFuncStrucLen (103) word (Hi-Lo) 9 SubFuncCode (02) byte 10 protocolFlags long 14 nodeFlags long 18 sourceOriginateTime int64 26 targetReceiveTime int64 34 targetTransmitTime int64 42 sourceReturnTime int64 50 eventOffset int64 58 eventTime long 62 serverName char[50]
Reply
Offset Content Type (reply header) 8 SubFuncStrucLen (103) word (Hi-Lo) 10 SubFuncCode (02) byte 11 protocolFlags long 15 nodeFlags long 19 sourceOriginateTime int64 27 targetReceiveTime int64 35 targetTransmitTime int64 43 sourceReturnTime int64 51 eventOffset int64 59 eventTime long 63 serverName char[50]
Completion Code
0 0x00 Successful 126 0x7E NCP Boundary Check Failed 251 0xFB Invalid Subfunction Request
Remarks
The time that is returned is UTC time. It is the number of seconds from January 1, 1970.
Note that the Exchange_Time_Struct is used in both the request and reply fields. The Exchange_Time_Struct will be modifed to reflect the actual target data. This call can be called by other servers (primary, and secondary) and by clients to get the time. Since the client originating the call knows how the data can be used he can choose to ignore fields which don't apply. Note: The server name must be null terminated -- that is why the structure has an extra 49th byte in it. If the server name is not null then this server will attempt to notify that server when a network event is received -- reinitialize, set time, etc.
typedef struct Exchange_Time_Struct
{
/* SubFunction information is to complete NCP header*/
WORD SubFunctionLength;
BYTE SubFunctionCode;
LONG protocolFlags; /* of source */
LONG nodeFlags; /* of source & target*/
int64 sourceOriginateTime;
int64 targetReceiveTime;
int64 targetTransmitTime;
int64 sourceReturnTime;
int64 eventOffset; /* seconds only - sub seconds used for flags*/
LONG eventTime; /* seconds only */
PaddedServerName serverName; /* source on input, target on output*/ /* size = 50 bytes*/
} Exchange_Time_Struct; /* total size of structure = 105 bytes */
| v2.x | v3.x | v4.x | v5.x |
Request
Offset Content Type (request header) 6 FunctionCode (114) byte 7 SubFuncStrucLen (5) word (Hi-Lo) 9 SubFuncCode (05) byte 10 StartNumber long
Reply
Offset Content Type (reply header) 8 nameType word 20 serverName char[48] 28 serverListFlags long 32 startNumberFlag word
Completion Code
0 0x00 Successful 126 0x7E NCP Boundary Check Failed 251 0xFB Invalid Subfunction Request
Remarks
| v2.x | v3.x | v4.x | v5.x |
Request
Offset Content Type (request header) 6 FunctionCode (114) byte 7 SubFuncStrucLen (5) word (Hi-Lo) 9 SubFuncCode (06) byte 10 StartNumber long
Reply
Offset Content Type (reply header) 8 nameType word 20 serverName char[48] 28 serverListFlags long 32 startNumberFlag word
Completion Code
0 0x00 Successful 126 0x7E NCP Boundary Check Failed 251 0xFB Invalid Subfunction Request
Remarks
NOTE: It appears that this NCP has been rigged to just return zero or success in all cases regardless of input. It currently does nothing other than this.
| v2.x | v3.x | v4.x | v5.x |
Request
Offset Content Type (request header) 6 FunctionCode (114) byte 7 SubFuncStrucLen (1) word (Hi-Lo) 9 SubFuncCode (12) byte
Reply
Offset Content Type (reply header) 8 version long
Completion Code
0 0x00 Successful 126 0x7E NCP Boundary Check Failed 251 0xFB Invalid Subfunction Request
Remarks
This NCP gets the timesync version from the server. It is the NCP alternative to calling the API "TimeSyncGetVersion".