1. IP Mobility Support for IPv4, rfc3344.
1.1 Mobile IP引入3个功能体.
1.1.1 Mobile Node: 一个主机,可以在改变网络接入位置的情况下(接入不同的子网),不改变通讯的IP地址。
1.1.2 Home Agent: 一般情况下,是MN的归属网络上的路由器。负责 a)维护属于该HA的MN的位置信息;b)MN离开归属网络时,为MN转发数据。
1.1.3 Foreign Agent: 一般情况下,是MN当前访问网络上的路由器。当MN在上面注册时,提供路由服务。
1.2 Mobile IP的主要过程.
2. Mobile IP Network Access Identifier Extension for IPv4, rfc2794
在MN(Mobile Node)不知道Home Address的情况下,MN可以使用AAA的NAI(Network Access Identifier)用于身份识别。这时,Registration Request消息中的Home Address域要被设置成全零,并增加一个Mobile Node NAI的附加域。
FA (Foreign Agent)收到Registration Request消息后,如果发现Home Address为全零,则应该使用NAI进行消息路由。
Thursday, July 15, 2010
Thursday, July 8, 2010
Wednesday, July 7, 2010
EAP
1. Extensible Authentication Protocol (EAP), rfc3748
1.1 EAP 定义了一个身份验证的框架,支持多种验证算法。
1.2 EAP 对下层的传输协议没有依赖,自己提供可靠传输。具体来说,采用一一应答的方式,每一时刻处于传输过程中的消息只有一个。这种方式效率比较低,不适合用作大量数据传输。
1.3 EAP 复用模型
1.3.1 Lower layer. The lower layer is responsible for transmitting and receiving EAP frames between the peer and authenticator.
1.3.2 EAP layer. The EAP layer receives and transmits EAP packets via the lower layer, implements duplicate detection and retransmission, and delivers and receives EAP messages to and from the EAP peer and authenticator layers.
1.3.3 EAP peer and authenticator layers. Based on the Code field, the EAP layer demultiplexes incoming EAP packets to the EAP peer and authenticator layers.
1.3.4 EAP method layers. EAP methods implement the authentication algorithms and receive and transmit EAP messages via the EAP peer and authenticator layers.
1.4 EAP一共支持4种消息:Request/Response/Success/Failure
2. RADIUS Support For Extensible Authentication Protocol (EAP); rfc3579
2.1 In RADIUS/EAP, RADIUS is used to shuttle RADIUS-encapsulated EAP Packets between the NAS and an authentication server. EAP-Message and Message-Authenticator attributes are introduced to support EAP.
2.2 Example
3. The EAP-TLS Authentication Protocol; rfc5216
3.1 EAP-TLS (Transport Layer Security) 在EAP协议的基础上,提供了一种 "certificate-based" 双向的身份验证和密钥生成机制
4. Basic case
1.1 EAP 定义了一个身份验证的框架,支持多种验证算法。
1.2 EAP 对下层的传输协议没有依赖,自己提供可靠传输。具体来说,采用一一应答的方式,每一时刻处于传输过程中的消息只有一个。这种方式效率比较低,不适合用作大量数据传输。
1.3 EAP 复用模型
1.3.1 Lower layer. The lower layer is responsible for transmitting and receiving EAP frames between the peer and authenticator.
1.3.2 EAP layer. The EAP layer receives and transmits EAP packets via the lower layer, implements duplicate detection and retransmission, and delivers and receives EAP messages to and from the EAP peer and authenticator layers.
1.3.3 EAP peer and authenticator layers. Based on the Code field, the EAP layer demultiplexes incoming EAP packets to the EAP peer and authenticator layers.
1.3.4 EAP method layers. EAP methods implement the authentication algorithms and receive and transmit EAP messages via the EAP peer and authenticator layers.
1.4 EAP一共支持4种消息:Request/Response/Success/Failure
2. RADIUS Support For Extensible Authentication Protocol (EAP); rfc3579
2.1 In RADIUS/EAP, RADIUS is used to shuttle RADIUS-encapsulated EAP Packets between the NAS and an authentication server. EAP-Message and Message-Authenticator attributes are introduced to support EAP.
2.2 Example
3. The EAP-TLS Authentication Protocol; rfc5216
3.1 EAP-TLS (Transport Layer Security) 在EAP协议的基础上,提供了一种 "certificate-based" 双向的身份验证和密钥生成机制
4. Basic case
Monday, July 5, 2010
RADIUS
1. Remote Authentication Dial In User Service (RADIUS), rfc2865
RADIUS本身是个比较简单的协议,支持远程身份验证和Proxy. 通过下面几个消息,配合user-name, user-password等Attributes完成身份验证和用户配置功能。典型的应用有PPP验证等。
Access-Request
Access-Accept
Access-Reject
Access-Challenge
RADIUS使用UDP协议来传递数据,IANA端口为 1812
2. RADIUS Accounting, rfc2866
RADIUS协议的扩展,支持从Network Access Server (NAS) 到 RADIUS accounting server传递计费信息。IANA端口 1813
在服务开始和结束的时候,RADIUS Accounting Client发送Accounting-Request消息到RADIUS Accounting server,服务状态在Attribute中说明。 Server接受这条消息时,返回Accounting-Response消息,否则,什么也不返回。Client超时后,可能重发这条Request消息,也可能重建一条消息发送给备用服务器。
3. Dynamic Authorization Extensions to RADIUS, rfc3576
RADIUS协议扩展,允许RADIUS server主动发起会话,动态地修改用户的session。比如改变用户的授权,或者断开该用户的连接。
Disconnect-Request
Disconnect-ACK
Disconnect-NAK
CoA(Change-of-Authorization)-Request
CoA(Change-of-Authorization)-ACK
CoA(Change-of-Authorization)-NAK
RADIUS本身是个比较简单的协议,支持远程身份验证和Proxy. 通过下面几个消息,配合user-name, user-password等Attributes完成身份验证和用户配置功能。典型的应用有PPP验证等。
Access-Request
Access-Accept
Access-Reject
Access-Challenge
RADIUS使用UDP协议来传递数据,IANA端口为 1812
2. RADIUS Accounting, rfc2866
RADIUS协议的扩展,支持从Network Access Server (NAS) 到 RADIUS accounting server传递计费信息。IANA端口 1813
在服务开始和结束的时候,RADIUS Accounting Client发送Accounting-Request消息到RADIUS Accounting server,服务状态在Attribute中说明。 Server接受这条消息时,返回Accounting-Response消息,否则,什么也不返回。Client超时后,可能重发这条Request消息,也可能重建一条消息发送给备用服务器。
3. Dynamic Authorization Extensions to RADIUS, rfc3576
RADIUS协议扩展,允许RADIUS server主动发起会话,动态地修改用户的session。比如改变用户的授权,或者断开该用户的连接。
Disconnect-Request
Disconnect-ACK
Disconnect-NAK
CoA(Change-of-Authorization)-Request
CoA(Change-of-Authorization)-ACK
CoA(Change-of-Authorization)-NAK
Monday, June 28, 2010
MinGW and DLL
http://wyw.dcweb.cn/dllfaq.htm
A. Assume we have a testdll.h, testdll.c, and testmain.c. In the first case, we will compile testdll.c with MinGW, and let the MSVC-compiled testmain call it. You should use
gcc -shared -o testdll.dll testdll.c \
-Wl,--output-def,testdll.def,--out-implib,libtestdll.a
to produce the DLL and DEF files. MSVC cannot use the MinGW library, but since you have already the DEF file you may easily produce one by the Microsoft LIB tool:
lib /machine:i386 /def:testdll.def
Once you have testdll.lib, it is trivial to produce the executable with MSVC:
cl testmain.c testdll.lib
Now for MinGW programs calling an MSVC DLL. We have two methods. One way is to specify the LIB files directly on the command line after the main program (in newer MinGW versions; MinGW GCC 2.95.2 is reported not to work). For example, after
cl /LD testdll.c
use
gcc -o testmain testmain.c testdll.lib
The other way is to produce the .a files for GCC. For __cdecl functions (in most cases), it is simple: you only need to apply the reimp tool (the original site is unavailable now, but you may download here a version enhanced by José Fonseca):
reimp testdll.lib
gcc -o testmain testmain.c -L. -ltestdll
However, the above method does not work with __stdcall functions. For MSVC will prefix an underscore to __stdcall functions while MinGW will not. The right way is to produce the DEF file using the pexports tool (downloadable here if not found elsewhere) and filter off the first underscore by sed:
pexports testdll.dll | sed "s/^_//" > testdll.def
Then, when using dlltool to produce the import library, add `-U' to the command line:
dlltool -U -d testdll.def -l libtestdll.a
And now, you can proceed in the usual way:
gcc -o testmain testmain.c -L. -ltestdll
A. Assume we have a testdll.h, testdll.c, and testmain.c. In the first case, we will compile testdll.c with MinGW, and let the MSVC-compiled testmain call it. You should use
gcc -shared -o testdll.dll testdll.c \
-Wl,--output-def,testdll.def,--out-implib,libtestdll.a
to produce the DLL and DEF files. MSVC cannot use the MinGW library, but since you have already the DEF file you may easily produce one by the Microsoft LIB tool:
lib /machine:i386 /def:testdll.def
Once you have testdll.lib, it is trivial to produce the executable with MSVC:
cl testmain.c testdll.lib
Now for MinGW programs calling an MSVC DLL. We have two methods. One way is to specify the LIB files directly on the command line after the main program (in newer MinGW versions; MinGW GCC 2.95.2 is reported not to work). For example, after
cl /LD testdll.c
use
gcc -o testmain testmain.c testdll.lib
The other way is to produce the .a files for GCC. For __cdecl functions (in most cases), it is simple: you only need to apply the reimp tool (the original site is unavailable now, but you may download here a version enhanced by José Fonseca):
reimp testdll.lib
gcc -o testmain testmain.c -L. -ltestdll
However, the above method does not work with __stdcall functions. For MSVC will prefix an underscore to __stdcall functions while MinGW will not. The right way is to produce the DEF file using the pexports tool (downloadable here if not found elsewhere) and filter off the first underscore by sed:
pexports testdll.dll | sed "s/^_//" > testdll.def
Then, when using dlltool to produce the import library, add `-U' to the command line:
dlltool -U -d testdll.def -l libtestdll.a
And now, you can proceed in the usual way:
gcc -o testmain testmain.c -L. -ltestdll
Thursday, June 17, 2010
GSM A-interface (BSS - MSC)
1. 基本描述: ts 48.001
2. BSS - MSC 功能划分原则:ts 48.002
2.1 一般来说,用 MSC( Mobile Core Network) 代表核心网的用户面和控制面。有些情况下,MSC被分为两部分MSC-Server(MSC-S)和Media Gateway(MGW).
2.2 Mobility management
All transactions concerning mobility management (as specified in 3GPP TS 44.018) shall take place transparently between the MS and MSC/VLR/HLR, using the protocols described in Technical Specifications 3GPP TS 48.008 and 3GPP TS 48.006. The only exception to this rule is that of paging which is scheduled by the BSS on the appropriate cell.
2.3 Call control 由 MSC/HLR/VLR 负责
3. 信令传输: ts 48.006
3.1 The MTP and the SCCP are used to support signalling messages between the MSC and the BSS
3.2 One user function of the SCCP, called BSS Application Part (BSSAP) is defined. In the case of point-to-point calls the BSSAP uses one signalling connection per active Mobile Station having one or more active transactions for the transfer of layer 3 messages. The BSSAP user function is further subdivided into two separate functions:
3.2.1 he Direct Transfer Application sub-Part (DTAP) is used to transfer messages between the MSC and the MS; the layer-3 information in these messages is not interpreted by the BSS.
3.2.2 he BSS Management Application sub-Part (BSSMAP) supports other procedures between the MSC and the BSS related to the MS (resource management, handover control), or to a cell within the BSS, or to the whole BSS.
4. L3 specifications: ts 48.008
4.1 BSC负责管理本地的无线资源
4.2 CC(call control) 和MM(Mobility Management)消息,BSS使用DTAP协议传递给MSC,不做处理
4.3 从Radio收到的initial L3 message,BSS初步分析后使用BSSMAP的COMPLETE LAYER 3 INFORMATION消息传递给MSC.(eg. CM SERVICE REQUEST, PAGING RESPONSE, CM REESTABLISHMENT REQUEST, LOCATION UPDATING REQUEST, IMSI DETACH, IMMEDIATE SETUP)
2. BSS - MSC 功能划分原则:ts 48.002
2.1 一般来说,用 MSC( Mobile Core Network) 代表核心网的用户面和控制面。有些情况下,MSC被分为两部分MSC-Server(MSC-S)和Media Gateway(MGW).
2.2 Mobility management
All transactions concerning mobility management (as specified in 3GPP TS 44.018) shall take place transparently between the MS and MSC/VLR/HLR, using the protocols described in Technical Specifications 3GPP TS 48.008 and 3GPP TS 48.006. The only exception to this rule is that of paging which is scheduled by the BSS on the appropriate cell.
2.3 Call control 由 MSC/HLR/VLR 负责
3. 信令传输: ts 48.006
3.1 The MTP and the SCCP are used to support signalling messages between the MSC and the BSS
3.2 One user function of the SCCP, called BSS Application Part (BSSAP) is defined. In the case of point-to-point calls the BSSAP uses one signalling connection per active Mobile Station having one or more active transactions for the transfer of layer 3 messages. The BSSAP user function is further subdivided into two separate functions:
3.2.1 he Direct Transfer Application sub-Part (DTAP) is used to transfer messages between the MSC and the MS; the layer-3 information in these messages is not interpreted by the BSS.
3.2.2 he BSS Management Application sub-Part (BSSMAP) supports other procedures between the MSC and the BSS related to the MS (resource management, handover control), or to a cell within the BSS, or to the whole BSS.
4. L3 specifications: ts 48.008
4.1 BSC负责管理本地的无线资源
4.2 CC(call control) 和MM(Mobility Management)消息,BSS使用DTAP协议传递给MSC,不做处理
4.3 从Radio收到的initial L3 message,BSS初步分析后使用BSSMAP的COMPLETE LAYER 3 INFORMATION消息传递给MSC.(eg. CM SERVICE REQUEST, PAGING RESPONSE, CM REESTABLISHMENT REQUEST, LOCATION UPDATING REQUEST, IMSI DETACH, IMMEDIATE SETUP)
Wednesday, February 24, 2010
XML
"The skew.org XML Tutorial"
http://skew.org/xml/tutorial/
"C/C++ developers: Fill your XML toolbox"
http://www.ibm.com/developerworks/xml/library/x-ctlbx.html
Simple C++ XML tools (DOM)
RapidXML
http://rapidxml.sourceforge.net/
TinyXML
http://www.grinninglizard.com/tinyxml/
pugixml
http://code.google.com/p/pugixml/
http://skew.org/xml/tutorial/
"C/C++ developers: Fill your XML toolbox"
http://www.ibm.com/developerworks/xml/library/x-ctlbx.html
Simple C++ XML tools (DOM)
RapidXML
http://rapidxml.sourceforge.net/
TinyXML
http://www.grinninglizard.com/tinyxml/
pugixml
http://code.google.com/p/pugixml/
Subscribe to:
Posts (Atom)