⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 260.htm

📁 unix高级编程原吗
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://apue.dhs.org"><font face="黑体"><big><big>apue</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center">               ● UNIX网络编程                       (BM: clown)                </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p   align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="index.htm">回到开始</a>][<a href="247.htm">上一层</a>][<a href="261.htm">下一篇</a>]
<hr><p align="left"><small>发信人: nothing (迷茫~浮), 信区: Winsock <br>

标  题: icq protocol(6) <br>

发信站: 武汉白云黄鹤站 (Thu May 11 10:18:16 2000), 转信 <br>

  <br>

MESSAGES SENT BY THE SERVER <br>

=========================== <br>

ACK (0A 00) Acknowledgement <br>

--- <br>

Parameters: None <br>

NOTE! Unlike all other commands, in ACK the field SEQ_NUM contains the <br>

sequence number of the *client's* packet the server acknowledges. Note <br>

further that an ACK should *not* be acknowledged! <br>

LOGIN_REPLY (5A 00) Login reply <br>

----------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

4 bytes xx xx xx xx USER_UIN The user's UIN <br>

4 bytes xx xx xx xx USER_IP The user's IP address <br>

2 bytes xx xx LOGIN_SEQ_NUM Login sequence number <br>

4 bytes 01 00 01 00 X1 *Unknown <br>

4 bytes xx 00 16 00 X2 *Unknown (xx=19 or 18) <br>

4 bytes 8C 00 00 00 X3 *Unknown <br>



4 bytes 78 00 05 00 X4 *Unknown <br>

6 bytes 0A 00 05 00 01 00 X5 *Unknown <br>

This is sent from the server upon receipt of a LOGIN. The LOGIN_SEQ_NUM is <br>

the same as in the corresponding LOGIN. <br>

USER_ONLINE (6E 00) User on contact list is online/has changed online status <br>

----------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

4 bytes xx xx xx xx REMOTE_UIN The UIN of the user who has lo <br>

gged in <br>

4 bytes xx xx xx xx REMOTE_IP The IP address of the user <br>

4 bytes xx xx xx xx REMOTE_PORT The TCP port of the user <br>

4 bytes xx xx xx xx REMOTE_REAL_IP The actual IP address of the u <br>

ser <br>

1 byte 04 X1 *Unknown <br>

4 bytes xx xx xx xx STATUS New status of the user <br>

4 bytes 02 00 00 00 X2 *Unkown <br>

The REMOTE_IP is the "outer" IP address of the remote user, the <br>

REMOTE_REAL_IP is the "inner" IP address. These two will be identical unless <br>

the remote user is behind a firewall. The REMOTE_IP is the "official" IP <br>

address, as shown e.g. by the Info box in the client. The REMOTE_PORT is the <br>



TCP port number to use when the client wishes to open a direct connection <br>

to the remote user. <br>

USER_OFFLINE (78 00) User on contact list has gone offline <br>

------------ <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

4 bytes xx xx xx xx REMOTE_UIN The UIN of the user who has lo <br>

gged out <br>

USER_FOUND (8C 00) User record found matching search criteria <br>

---------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

2 bytes xx xx SEARCH_SEQ_NUM Search sequence number <br>

4 bytes xx xx xx xx FOUND_UIN Found user's UIN <br>

2 bytes xx xx LENGTH Length of NICK_NAME including <br>

NULL <br>

variable NICK_NAME Found user's nick name, NULL t <br>

erminated <br>

2 bytes xx xx LENGTH Length of FIRST_NAME including <br>

NULL <br>

NULL <br>

variable FIRST_NAME Found user's first name, NULL <br>

terminated <br>

2 bytes xx xx LENGTH Length of LAST_NAME including <br>

NULL <br>

variable LAST_NAME Found user's last name, NULL t <br>

erminated <br>

2 bytes xx xx LENGTH Length of E_MAIL including NUL <br>

L <br>

variable E_MAIL Found user's e-mail, NULL term <br>

inated <br>

1 byte xx AUTHORIZE User's authorization status <br>

For each user found matching the criterion, a USER_FOUND will be returned. <br>

When all USER_FOUND's have been sent, the server will send an END_OF_SEARCH. <br>

If no users where found matching the criterion, an END_OF_SEARCH will be <br>

sent immediately, and no USER_FOUND will be sent. The AUTHORIZE determine <br>

wether the user allow anyone to include him/her on their contact list, or <br>

wether the user must accept first. Possible values of AUTHORIZE: <br>

00 = The user must authorize the client to include him/her on the client's <br>

contact list <br>

01 = The user allows anyone to include him/her on their contact list <br>

RECEIVE_MESSAGE (DC 00) Message sent while offline/through server <br>

--------------- <br>



Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

4 bytes xx xx xx xx REMOTE_UIN The sending user's UIN <br>

2 bytes xx xx YEAR The year the message was sent <br>

1 byte xx MONTH The month the message was sent <br>

1 byte xx DAY The day of the month the messa <br>

ge was sent <br>

1 byte xx HOUR The hour the message was sent <br>

in GMT <br>

1 byte xx MINUTE The minute the message was sen <br>

t <br>

2 bytes xx xx TYPE The type of message (message, <br>

URL, etc) <br>

2 bytes xx xx LENGTH Length of MESSAGE including NU <br>

LL <br>

variable MESSAGE The message sent, NULL termina <br>

ted <br>

Note that the HOUR contains the local time - 1 (unless GMT is involved <br>

somehow?). The TYPE identifies the type of message this is: <br>

01 00 = Normal message <br>

04 00 = URL (MESSAGE contains first the description, then a FE, and then <br>



the actual URL) <br>

0C 00 = 'You were added' message. (MESSAGE contains: FE name> FE FE FE . <br>

The authorize> is '1' (31) if the user allows anyone to add him/her to <br>

their contact list, and '0' (30) otherwise.) <br>

END_OF_SEARCH (A0 00) No more USER_FOUND will be sent <br>

------------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

2 bytes xx xx SEARCH_SEQ_NUM Search sequence number <br>

1 byte xx MORE_FOUND More users found but not displ <br>

ayed? <br>

If MORE_FOUND is 00, then the returned USER_FOUND's contain information <br>

about all matching users. If MORE_FOUND is 01 however, then the server has <br>

found more users matching, but will not display more matches. The limit is <br>

drawn by 40 users. If a search request results in more than 40 matches, <br>

only the 40 first will be sent to the client, and MORE_FOUND will be set to <br>

01. <br>

INFO_REPLY (18 01) Return basic information about a user <br>

---------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>



------ ------------------ ---- ----------- <br>

2 bytes xx xx INFO_SEQ_NUM Information sequence number <br>

4 bytes xx xx xx xx REMOTE_UIN The remote user's UIN <br>

2 bytes xx xx LENGTH Lenght of NICK_NAME including <br>

NULL <br>

variable NICK_NAME The remote user's nick name <br>

2 bytes xx xx LENGTH Lenght of FIRST_NAME including <br>

NULL <br>

variable FIRST_NAME The remote user's first name <br>

2 bytes xx xx LENGTH Lenght of LAST_NAME including <br>

NULL <br>

variable LAST_NAME The remote user's last name <br>

2 bytes xx xx LENGTH Lenght of E_MAIL including NUL <br>

L <br>

variable E_MAIL The remote user's e-mail <br>

1 byte xx AUTHORIZE User's authorization status <br>

Note that the parameters are identical to command USER_FOUND (8C 00). For <br>

more information about the fields, see USER_FOUND. <br>

EXT_INFO_REPLY (22 01) Return extended information about a user <br>

-------------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>



------ ------------------ ---- ----------- <br>

2 bytes xx xx INFO_SEQ_NUM Information sequence number <br>

4 bytes xx xx xx xx REMOTE_UIN The remote user's UIN <br>

2 bytes xx xx LENGTH Lenght of CITY including NULL <br>

variable CITY The remote user's city <br>

2 bytes xx xx COUNTRY_CODE The remote user's country code <br>

1 byte xx COUNTRY_STATUS Indicates if COUNTRY_CODE is e <br>

ntered or not <br>

2 bytes xx xx LENGTH Lenght of STATE including NULL <br>

variable STATE The remote user's state (USA o <br>

nly) <br>

2 bytes xx xx AGE The remote user's age <br>

1 byte xx SEX The remote user's sex <br>

2 bytes xx xx LENGTH Lenght of PHONE including NULL <br>

variable PHONE The remote user's city <br>

2 bytes xx xx LENGTH Lenght of HOME_PAGE including <br>

NULL <br>

variable HOME_PAGE The remote user's city <br>

2 bytes xx xx LENGTH Lenght of ABOUT including NULL <br>

variable ABOUT The remote user's city <br>

The code used in COUNTRY_CODE is the international telephone prefix, e.g. <br>

01 00 (1) for the USA, 2C 00 (44) for the UK, 2E 00 (46) for Sweden, etc. <br>



COUNTRY_STATUS is normally FE, unless the remote user has not entered a <br>

country, in which casse COUNTRY_CODE will be FF FF, and COUNTRY_STATUS will <br>

be 9C. The field AGE has the value FF FF if the user has not entered his/her <br>

age. The field SEX has three (!) possible values: <br>

00 = Not specified <br>

01 = Female <br>

02 = Male <br>

The ABOUT field is an optional free form field that allows the user to make <br>

a personal presentation of himself/herself. <br>

STATUS_UPDATE (A4 01) User on contact list has changed online status (Away etc <br>

) <br>

------------- <br>

Parameters: <br>

Length Content (if fixed) Name Description <br>

------ ------------------ ---- ----------- <br>

4 bytes xx xx xx xx REMOTE_UIN UIN of the user whos status ha <br>

s changed <br>

4 bytes xx xx xx xx STATUS The new online status of the u <br>

ser <br>

The online status in STATUS is the same as used in STATUS_CHANGE (D8 04). <br>

See STATUS_CHANGE for details. <br>

  <br>



-- <br>

※ 来源:.武汉白云黄鹤站 bbs.whnet.edu.cn.[FROM: 202.120.9.13] <br>

</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="247.htm">上一层</a>][<a href="261.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -