关于MSNP开发中的命令参数

嵌入式状态机编程-QP状态机框架与常见状态机方法 状态机基本术语 现态:是指当前所处的状态。 条件:又称为“事件”,当一个条件被满足,将会触发一个动作,或者执行一次状态的迁移。 动作:条件满足后执行的动作。动作执行完毕后,可以迁移到新的状态,也可以仍旧保持原状态。动作不是必需的,当条件满足后,也可以不执行任何动作,直接迁移到新状态。 次态:条件满足后要迁往的新状态。“次态”是相对于“现态”而言的,“次态”一旦被激活,就转变成新的“现态”了。 传统有限状态机Fsm实现方法 如图,是一个定时计数器,计数器存在两种状态,一种为设置状态,一种为计时状态 设 阅读详情

What are commands?
Everything sent between the client and the server is in the form of a command. Commands are represented with a three letter, all-caps, command code. All normal commands have a transaction ID (explained below) and end with a newline (also explained below). Commands sent by the client will generally cause the server to respond with one or more commands.

There are four special types of commands which behave slightly differently than normal commands. Payload Commands span over multiple lines. Error commands have numbers instead of letters in their command code. Asynchronous commands are sent by the server without the client explicitly requesting them, and do not contain transaction IDs. Finally, the PNG command and some SYN responses don't contain transaction IDs.

Newlines
Every normal command ends with a newline (see the Payload Commands page for exceptions). The use of /r and /n throughout this document are explained here. The official client always ends commands with /r/n and the server always ends commands with /r/n. It is recommended that you do this too.

However, the server will accept commands ending with just /n, but not just /r. If you are looking to save as much bandwidth as possible, go ahead and use /n, and there shouldn't be any problems unless MSN changes their server code.

Inside the payloads of payload commands, newlines are treated slightly differently. Their behaviour is discussed on the Payload Commands page.

Parameters
Parameters exist to provide additional information with each command. Most commands have at least one parameter. Each parameter is separated by a space. Some commands also have a transaction ID immediately after the command and before the parameters. For the purposes of this documentation, the TrID does not count as a parameter. The following command has one parameter:

<<< FLN example@passport.com/r/n

FLN is the command, example@passport.com is the parameter, and /r/n is the newline.

It is possible to send certain commands with multiple spaces between parameters, tabs instead of spaces, tabs mixed with spaces, and trailing spaces and tabs. This has not been thoroughly tested. In any case, the server always sends one space in between parameters and no trailing whitespace (with the exception of the standard newlines).

Transaction IDs (TrIDs)
Transaction IDs, abbreviated as TrIDs, are used to match a client command with a server response. Commands sent by the client are required to contain a TrID, and commands from the server sent in direct response to that command will contain the same TrID (with the exceptions noted above). In most cases, there will be just one response to each client command.

Every TrID is a number between 0 and 4294967295 (2 to the power 32, minus 1). Even though completely legal, it is advisable not to use 0 as a TrID because some asynchronous commands use 0 as the TrID and it may cause confusion. The TrID always comes right after the three letter (or three digit, in the case of errors) command code, and they are separated by a space. If the command has parameters, the parameters will follow the TrID and they will be separated by another space. Otherwise, there will be no space after the TrID. Below is an example of sending the VER command with a TrID of 15 and receiving the response from the server.

>>> VER 15 MSNP8 FOO CVR0 BAR/r/n

<<< VER 15 MSNP8 CVR0/r/n

The server does not make any changes based on your TrID; it only responds using the same TrID you sent it. If your TrID is greater than 4294967295, the server will behave unpredictably. If you send a TrID that is not a positive integer, the server will immediately disconnect you. If you repeat the same TrID in multiple commands, the server will not do anything differently, but it will be more difficult for the client to track responses.

The official client always increments the TrID by one after sending each command. As long as you stay in the correct range and don't repeat TrIDs, it doesn't make much of a difference. Keeping the number low will save a small amount of bandwidth - probably not more than 5% of your total bandwidth for the session. Using random numbers will increase your processor use and not increase your security at all.

Error Commands
An error is a special type of command sent by the server in response to a client command which it couldn't obey or couldn't understand. Errors follow all of the normal rules of commands, except that the three-character command codes are always three-digit numbers. A detailed list of errors can be found in the Error List page.

If something goes wrong, an error will be sent in place of the expected command. For example, if a client sends an ADD command, it should normally receive another ADD command back from the server. However, if the client specifies a nonexistent account name as a parameter, the server will respond with error 201 instead of the ADD command.

Clients never send error codes to the server. The server never sends error codes that aren't in response to any particular client command.

Error Syntax
The syntax of an error command is very simple. The command code is just a three digit number, and it specifies the TrID of the client command it is in response to. There are no additional parameters.

However, according to the original IETF draft, errors can be sent with additional parameters. I have never seen anything like that sent, but just in case, every client should be prepared to receive parameters without crashing.

Payload Commands
Most messages are just one line of data, ending with a newline. Payload commands have a chunk of data following the newline. The length of this data (in bytes) is specified in the last parameter of the command. The payload commands in MSNP8 are QRY, PAG, NOT and (most importantly) MSG. Here is an example of a payload command:

>>> QRY 1049 msmsgs@msnmsgr.com 32/r/n
    8f2f5a91b72102cd28355e9fc9000d6e (no newline)

See the payload commands page for more details.

Asynchronous Commands
Asynchronous commands are commands sent by the server, but not in response to any command sent by the client. Because of their nature, they have no assigned TrID. Some asynchronous commands have no TrID, and just have the parameter immediately after the command code. Some of these commands are NLN, FLN, and BPR.

Other asynchronous commands always have a TrID of zero. Some of these commands are ADD and REM. The reason that these commands still have TrIDs is because they are also used as a client command with a server response. Only in special cases, like where a principal is added to the reverse list, does the server send the command as an asynchronous command with a TrID of zero.

Asynchronous commands can be sent at any legal place in the protocol - even between a block of related replies such as in between two ILNs.

Command Order
Usually, replies to commands will come in the order that you sent the commands. But this is not always the case. Sometimes, you may send commands in the order of 1, 2, 3, and the server will respond to them in the order of 2, 3, 1. This is why TrIDs are very useful.

Some commands have multiple responses from the server. These responses contain the same TrID as the original command (except SYN responses). A command that can have multiple responses is CHG.

Unfortunately, there are no real rules on the order of unrelated commands. For example, a client can receive an ILN in the middle of a list of BPRs. If you examine the server behaviour enough, you can start to make rules, but Microsoft often changes the server implementation and you would have to start all over. It's best for a client to just expect anything to happen.

【全局路径规划模块运动学算法】无人机Kinodynamic A*算法、Kinodynamic RRT*算法(附C++代码) 认知有限,望大家多多包涵,有什么问题也希望能够与大家多交流,共同成长!本文先对Kinodynamic A*算法做个简单的介绍,具体内容后续再更,其他模块可以参考去我其他文章提示:以下是本篇文章正文内容啃这个Kinodynamic A_star算法,建议先啃一啃高飞fast_planner那篇论文,把理论打好,如果还是比较迷,就先看Dijksta、再看A_star、再看hybrid A_star 三个的流程,因为往上资料比较多,再看这个Kinodynamic A_star算法,流程已经很相像了。如果。 阅读详情

相关推荐

电商秒杀场景下,如何用Redis+Lua脚本实现原子性库存扣减(附完整代码)

本文针对电商秒杀场景下的高并发与超卖难题,详细解析了如何利用Redis的原子性命令与Lua脚本实现可靠的库存扣减。通过对比多种方案,阐述了Redis+Lua作为黄金搭档的技术原理,并提供了从基础扣减到预扣减模型的完整代码实现,确保在高并发下数据的一致性与系统性能。

weixin_29219539的博客 508

4 OS command injection操作系统命令注入

4 OS command injection操作系统命令注入 目录4 OS command injection操作系统命令注入一、What is OS command injection?二、Executing arbitrary commandsLab: OS command injection, simple case三、 Useful commands In this section, we’ll explain what OS command injection is, describe how v

(∪.∪ )...zzz的博客 1202

手把手教你用C++和NI-VISA写个简易仪器上位机(附QT工程配置)

本文详细介绍了如何使用C++和QT框架结合NI-VISA驱动开发跨平台仪器控制上位机软件。从Ubuntu环境配置、VISA通信核心架构设计到QT界面与业务逻辑解耦,提供了完整的实战指南和代码示例,帮助开发者快速构建专业级仪器控制程序。

weixin_42522374的博客 286

MSNP10协议分析 00.基本 [by progsoft]

1999年,Microsoft向IETF提交了一份"MSN Messenger Service 1.0 Protocol"草案,这是最初版本的MSN Messenger协议。    现在MSN版本为6.2,协议版本为MSNP10,本文着重介绍MSNP10的基本情况。    文章以作者分析研究体会为主,同时参考他人资料完成。    MSN的协议都是基于TCP,除P2P的文件传输和语音对话等,所有

jiljil的专栏 692

DETRs with Collaborative Hybrid Assignments Training论文阅读与代码

在这篇论文中,作者观察到在DETR中将过少的 Query 分配为正样本,采用一对一的集合匹配,会导致对编码器输出的监督稀疏,严重损害编码器的区分特征学习,反之亦然,也会影响解码器中的注意力学习。为了缓解这个问题,作者提出了一种新颖的协同混合分配训练方案,名为Co-DETR,以从多样的标签分配方式中学习更高效、更有效的基于DETR的检测器。这种新的训练方案可以通过训练多个并行辅助 Head ,以一对多的标签分配方式(如ATSS和Faster RCNN)进行监督,轻松增强端到端检测器中编码器的学习能力。

qingjing0413的博客 1160

2025 高效抓取雪球社区数据:自动化导出Excel与PDF全攻略

本文详细介绍了2025年高效自动化抓取雪球社区数据的完整方案。通过Python脚本,用户可自动抓取帖子列表数据并导出为结构化的Excel表格,同时批量将帖子内容保存为PDF文档,并支持合并与添加书签,极大提升投资研究和信息整理的效率。

weixin_29034963的博客 702

MSNP15(MSN8.1)协议分析

MSNP15(MSN8.1)协议分析第1章.     MSNP15概述MSN是微软推出的一款聊天工具,它的通信协议是微软自己提出的MSNP(即MSN Protocol)。MSNP目前还不是因特网标准协议,但却发展迅速,被广泛地应用到各种聊天工具的开发中。MSNP更新很快,当前的最新版本为MSNP15(即版本15)。MSN8.1所使用的协议就是MSNP15。MSNP15支持即时消息、文件

彭令鹏(bripengandre)的专栏 7458

若依框架二次开发——若依 Vue3 版本前端样式优化指南

若依框架二次开发——若依 Vue3 版本前端样式优化指南

bjzhang75的博客 1702

MSNP9协议分析

转自:http://www.blogjava.net/wadise/archive/2006/04/23/42638.html?opt=admin 前 言 MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。该软件的最新版本是6.1

qinggebuyao的专栏 2199

OSError We couldn‘t connect to https://huggingface.co to load file, couldn‘t find it chatglm3-6b解决方案

本文主要介绍了OSError: We couldn’t connect to https://huggingface.co to load this file, couldn’t find it in the cached files and it looks like THUDM/chatglm3-6b is not the path to a directory containing a file named config.json.解决方案,希望能对学习python的同学们有所帮助。

weixin_43178406的博客 5万+

使用 MATLAB/Simulink 构建一个 基于神经网络控制的单相并网逆变器系统

单相并网逆变器广泛应用于户用光伏小型储能和电动汽车V2G等场景。其核心控制目标是实现高质量的并网电流,即电流与电网电压同频同相(单位功率因数),且总谐波畸变率 (THD)极低。非线性因素:电力电子器件的开关死区非线性电感寄生参数。参数不确定性:滤波器元件(L, C)的老化温漂。电网扰动:电压谐波频率波动不平衡。模型依赖性:PI、PR等控制依赖于精确的系统模型,模型失配导致性能下降。动态响应:在光照突变(光伏)或负载突变(储能)下,需快速、无超调地响应。

xiaoheshang_123的博客 277

MSNP18协议分析(二)--- MSN登录身份认证

目录(?)[+] 一 连接服务器 连接到DS服务器连接到NS服务器断开服务器连接 二 身份验证 SSO认证方式登录验证生成登录是发送的p 三 小结 这一篇开始主要介绍MSN登录部分的协议分析,总体来说,登陆这一块是整个MSNP协议的一大块,也是比较复杂的一部分。整个登录的过程主要包括:连接服务器,身份验证,获取用户信息和联系人列表,把联系人列表发送给服务器,发送个人

qinggebuyao的专栏 4758

python中视觉检测怎么将多个面拍照的图片合成一个3d图像,用什么技术或者什么模型?

🏆本文收录于 《全栈Bug调优(实战版)》 专栏,该专栏专注于分享我在真实项目开发中遇到的各类疑难Bug及其深层成因,并系统提供高效、可复现的解决思路和实操方案。无论你是刚入行的新手开发者,还是拥有多年项目经验的资深工程师,本专栏都将为你提供一条系统化、高质量的问题排查与优化路径,助力你加速成长,攻克技术壁垒,迈向技术价值最大化与职业发展的更高峰🚀!

**My Coding Family** 713

Java利用MSNP协议登录MSN

请参见上一篇文章,登录MSN协议具体Java实现:命令序列:>代表结果1.连接DS(Dispatcher Server),得到NS(Notification Server)>>VER 1 MSNP18>>CVR 2 14.0.8089 14.0.8089 14.0.8089 http://msgruser.dlservice.microsoft.com/download/0/9/7/0

星星的技术专栏 3577

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

MSN Messenger MSNP9 协议分析

前 言MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。该软件的最新版本是6.1。1999年,Microsoft向IETF提交了一份"MSN Messenger Service 1.0Protocol"草案,这是最初版本的

573

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

MSNP15协议的MSN报警--phpmsnclass

下载地址:http://space.itpub.net/batch.download.php?aid=13558 最近正在重新研究MSNP15协议的MSN报警-phpmsnclass,并完善一下之前用的采用MSNP9协议的MS...

cuiyinyao6929的博客 272

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

MSN Messenger协议概况

前 言MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。该软件的最新版本是6.1。1999年,Microsoft向IETF提交了一份"MSN Messenger Service 1.0 Protocol"草案,这是最初版本的M

0ffs3t 1532

MSNP9协议[转]

1.1MSN Messenger协议简介 原作者:汪俊杰 电子邮件:unicentre(at)gmail.com QQ:10402488 MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。 1999年,Microsoft向...

weixin_30612769的博客 153

MSN Messenger 协议分析——MSN Messenger Protocol概述(转)

一.What is the MSNP (MSN Messenger Protocol)?           MSN消息协议由一系列的在客户端和服务器之间传送的命令组成。例如,你的一个好友下线了,服务器就会发送一条消息:FLN example@hotmail.com 到你的客户端。你的客户端就会将这个好友标记为下线状态。FLN就是一个在服务器和客户端传送的命令,它带有参数example@hotm

漫漫人生路 2379

MSN Messenger协议 【 very cool stuff 】

 原作:bhw98 前 言MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。该软件的最新版本是6.1。1999年,Microsoft向IETF提交了一份"MSN Messenger Service 1.0 Protoc

FreeXploiT 2774

MSN Messenger协议 原作:bhw98

MSN Messenger协议 原作:bhw98 document.title="MSN Messenger协议 原作:bhw98 - "+document.title前 言MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。

昆仑 1584

MSN Messenger协议

原作:bhw98 前 言MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。使用MSN Messenger可以与他人进行文字聊天,语音对话,视频会议等即时交流,还可以通过此软件来查看联系人是否联机等。该软件的最新版本是6.1。1999年,Microsoft向IETF提交了一份"MSN Messenger Service 1.0 Protocol"

Stiwin Lee's Favorite 3281

MSNP8协议解析以及对客户端的模拟实现

由于现所在的公司的应用需要,因而有机会自己接触到了MSN 通信协议。前2周左右的时间里,自己完成了部分的功能,算是对协议的一次验证吧。在此贴出本文,希望能有抛砖引玉之效,言归正传吧。 与客户端交互的MSN的服务器种类有三种:分派服务器(Dispatch Server, DS),通知服务器(Notification Server, NS),以及接线服务器(Switch...

weixin_30678821的博客 688

MSN Messenger协议分析

MSN Messenger协议msn protocol本文摘自:http://www.vctop.com/摘录目的:学习之用,并不用于商业目的                                                                 原作:bhw98 前 言MSN Messenger 是Microsoft开发的聊天工具,目前在国内拥有很大的用户群。

面朝大海 春暖花开 3215
上一篇: MSNP协议开发中简写释意
下一篇: MSN通信中个人信息等的设置
大雨仔
博客等级 码龄23年 28粉丝 159原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值