• 沒有找到結果。

第五章 WinME在Linux作業系統下的實作

6.2 使用WinME開發應用程式指引

6.2.3 FTP 程式

FTP 應用程式可能會想註冊 LINK_UP、LINK_DOWN、IP_CHANGE、

DEFAULT_GATEWAY_CHANGE 的事件。

當 LINK_DOWN 事件產生後,就停止傳輸的動作,等到 LINK_UP 事件發生 時,可以嘗試續傳剛剛未傳完的資料,如果失敗的話,就等到 IP_CHANGE 的事 件發生,當 IP_CHANGE 事件發生後,就要準備續傳了,之後等到

DEFAULT_GATEWAY_CHANGE 事件發生後,就可以開始續傳。

第 7 章 結論與未來工作

7.1 結論

現今使用者裝置已經可以配置多個無線網路模組,而在未來使用者將會愈來 愈具有移動性,所以使用者所處的網路情況和以往固定在桌子上的電腦已經大不 相同了。所以為了提供使用者更好的使用經驗,應用程式需要針對目前網路的狀 態來調整本身的行為。

而本論文所提出的「支援具網路感知應用程式之中介軟體」可以讓應用程式 的開發人員方便的去處理網路底層的相關工作,這對於撰寫換手策略相關程式是 很有幫助的。

以往使用者空間的程式想要取得下層網路介面的狀態時,就不用不斷地使用 系統呼叫來取得網路介面的狀態,並且和前一次取得的網路介面狀態作比對了,

CPU 的時脈因此會浪費在這些多餘的系統呼叫上。

而本論文的中介軟體也提供了事件通知機制,因此網路事件產生時,應用程 式可以直接被通知,而不用去輪詢,省下 CPU 的時脈。

最後我們在 Linux 系統下實作了我們的中介軟體並將之名命為 WinME。

7.2 未來工作

本論文所提出的中介軟體,在未來可能可以增加更多的命令及事件,而 802.21 成為標準後,也許也可以跟 802.21 整合在一起。

本論文僅提供了機制,未來希望能夠以此機制為基礎,實作一套完整的行動 管理員程式,幫助使用者在多網路介面的情況下作換手決策,對於其他的網路應 用程式方面,使用該機制可以讓該應用程式對於網路狀態的改變更具有適應性。

參 考 文 獻

[1] Dave Bakken, “Middleware”, Encyclopedia of Distributed Computing, Kluwer, to appear: http://www.eecs.wsu.edu/~bakken/middleware.pdf.

[2] Jun-Zhao Sun, Jukka Riekki, Marko Jurmu, and Jaakko Sauvola, “Adaptive Connectivity Management Middleware for Heterogeneous Wireless Networks”, IEEE Wireless Communications, December 2005.

[3] Sun J., Tenhunen J., and Sauvola J., “CME: a middleware architecture for network-aware adaptive applications”, In Proceedings 14th IEEE PIMRC2003, Beijing, China, 2003

[4] Hawick K.A and James H.A., “Wireless Issues for a Mobility Management Middleware”, Submitted to CCN2002. Also DHPC Technical Report DHPC-111, August 2002.

[5] Tian, Y. Frank, S. Tsaoussidis, V. Badr, H., “Middleware Design Issues for Application Management in Heterogeneous Networks”, Networks 2000.

(ICON 2000).

[6] Li B, Nahrstedt K., “A Control-Based Middleware Framework for Quality of Service Adaptations", IEEE Journal of Selected Areas in Communication, 17(9): 1632~1650, 1999.

[7] Anthony Sang-Bum, Jens Meggers, Gunnar Forsgren, Erno Kovacs, Michael Rosinus, “UMTS: A Middleware Architecture and Mobile API Approach”, IEEE Personal Communications, April, 1998.

[8] Mika Ylianttila, "Vertical Handoff and Mobility - System Architecture and Transition Analysis", Faculty of Technology, Department of Electrical and Information Engineering, Infotech Oulu, University of Oulu, 2005.

[9] Milind Buddhikot, Girish Chandranmenon, Seungjae Han, et al., "Design and Implementation of a WLAN/CDMA2000 Interworking Architecture", IEEE Communications Magazine, November 2003.

[10] Hyosoon Park, et al., "Vertical Handoff Procedure and Algorithm between IEEE802.11 WLAN and CDMA Cellular Network", In Proceedings 7th CDMA International Conference, 217-221, Seoul, Korea, 2002.11.

[11] Bianchi G., Tinnirello I., Scalia L., "Handover across Heterogeneous

Wireless Systems: a Platform-Independent Control Logic Design", WPMC 2003.

[12] Bernaschi M, Cacace F, Iannello G., "Vertical Handoff Performance in Heterogeneous Networks", In: ICPP' 2004 Workshops, Aug 2004.

[13] Sebastien Pierrel, Topi Erlin, Janne Roslof, et al., “A Prototype for Policy Driven Control of Heterogeneous Network Access”, 2nd Workshop on

Applications of Wireless Communications (WAWC'04), in conjunction with The 13th International Summer School on Telecommunications, Lappeenranta, Finland, August 4-6, 2004.

[14] I. Tinnirello, L. Scalia, “Seamless Handover across Heterogeneous Wireless Networks: a Programmable Metric Approach”, SCI 2003, Luglio 2003, Orlando.

[15] Helen J. Wang, Randy H. Katz, Jochen Giese, “Policy-Enabled Handoffs across Heterogeneous Wireless Networks”, Proc. of ACM WMCSA, 1999.

[16] J. Rosenberg, H. Schulzrinne, G. Camarillo, et al., “SIP: Session Initiation Protocol”, IETF RFC3261, June 2002.

[17] C. Perkins, Ed., “IP Mobility Support for IPv4”, IETF RFC3344, Nokia Research Center, August 2002.

[18] Stevens W. R., “TCP/IP Illustrated, Volume I, The Protocols”, AWL, 1994.

[19] George Xylomenos, George C. P, "Internet Protocol Performance over Networks with Wireless Links", IEEE Network 13(4) 55-63, 1999.

[20] David. D. Clark, "The Structuring of Systems using Upcalls", ACM Symposium on Operating Systems, pp. 171-180, 1985.

[21] Geoffrey Howard Cooper, “The Argument for Soft Layer of Protocols”, Tech. Rep. Tr-300, Massachussets Institute of Technology, Cambridge, May 1983.

[22] Carneiro G., Ruela J., Ricardo M., “Cross-Layer design in 4G Wireless Terminals”, IEEE Wireless Communications, 11(2):7–13, April 2004.

[23] Arjan Peddemors, Hans Zandbelt, Mortaza Bargh, “A Mechanism for Host Mobility Management supporting Application Awareness”, MobiSys’04, Boston, Massachusetts, USA, June 6-9, 2004.

[24] Jinwei Cao, Dongsong Zhang, Kevin M. McNeill, “An overview of

network-aware applications for mobile multimedia delivery”, IEEE International Conference on System Sciences, Hawaii, 2004.

[25] Qi Qu, Yong Pei, XS Tian, “Network-Aware Source-Adaptive Video Coding for Wireless Applications”, IEEE Military Communicatians Conference,

MILCOM 2004 – 2004.

[26] Brian L. Tierney, Dan Gunter, Jason Lee, “Enabling Network-Aware Applications”, In 10th IEEE Symposium on High Performance Distributed Computing, 2001.

[27] Nancy Miller, Peter Steenkiste, “Collecting Network Status Information for

[28] Jurg Bolliger, Thomas Gross, “A Framework-Based Approach to the Development of Network-Aware Applications”, IEEE transactions on Software Engineering, vol. 24 no. 5, pp 376-390, 1998.

[29] J. Salim, H. Khosravi, A. Kleen, A. Kuznetsov, “Linux Netlink as an IP Services Protocol”, IETF RFC 3549, July 2003.

[30] IEEE 802.21 WG, “Draft IEEE Standard for Local and Metropolitan Area Networks: Media Independent Handover Services”, July 2005.

[31] T. Farnham, A. Gefflaut, A. Ibing, et al., “Toward Open and Unified Link-Layer API”, European Gollum Project, Proceedings of the IST Mobile and Wireless Summit 2005.

[32] Ta-Juan Chou, “Design and Implementation of Driver-Level Network Event Notification Mechanism in Linux”, WIN Lab NCTU, 2005.

[33] Shigeo Shioda, Takahiro Yagi, “A new approach to the bottleneck

bandwidth measurement for an end-to-end network path”, Communications, 2005.

ICC 2005. IEEE International Conference 2005.

[34] Cao Le Thanh Man, Go Hasegawa and Masayuki Murata, “Available bandwidth measurement via TCP connection”, in Proceedings of IFIP/IEEE MMNS ’04 E2EMON Workshop, Oct. 2004.

[35] Manish Jain, Constantinos Dovrolis, “End-to-end available bandwidth:

measurement methodology, dynamics, and relation with TCP throughput”, ACM SIGCOMM Computer Communication Review Volume 32, Issue 4, October 2002.

[36] Jurg Bolliger, Thomas Gross, Urs Hengartner, “Bandwidth Modeling for Network-Aware Applications”, in Proc. of IEEE INFOCOM, 1999.

[37] A. Yegin, Ed., “Link-layer Event Notifications for Detecting Network Attachments”, IETF draft-ietf-dna-link-information-03, Samsung AIT, October 24, 2005.

[38] Klaus Whhrle, Frank Pahlke, Hartmut Ritter, et al., “The LINUX

Networking Architecture – Design and Implementation of Network Protocols in the Linux Kernel”, Chapter 5, 2002.

[39] K. El Malki, Editor, “Low Latency Handoffs in Mobile IPv4”, IETF draft-ietf-mobileip-lowlatency-handoffs-v4-11, Athonet, 3 October 2005.

[40] Hidetoshi Yokota, Akira Idoue, Toru Hasegawa, “Link Layer Assisted Mobile IP Fast Handoff Method over Wireless LAN Networks”, MOBICOM’02, Atlanta, Georgia, USA, September 23–28, 2002.

[41] Niebert N., Prytz M., Schieder A., et al., “Ambient Networks: a Framework for Future Wireless Internetworking”, To appear Proc. IEEE 61st Semiannual Vehicular Technology Conference (VTC 2005 Spring), Stockholm, Sweden, May 30 - June 1, 2005.

[42] Petri Mahonen and Tommi Saarinen, “Platform-Independent IP

Transmission over Wireless Networks: The WINE Approach”, IEEE Personal Communications, December 2001.

[43] Vijay T. Raisinghani, Sridhar Iyer, “Cross-Layer Feedback Architecture for Mobile Device Protocol Stacks”, IEEE Communications Magazine, January 2006.

[44] Vijay T. Raisinghani, Sridhar Iyer, “ECLAIR: An Efficient Cross-Layer Architecture for Wireless Protocol Stacks”, World Wireless Cong., San Francisco, CA, May 2004.

[45] Qi Wang, Abu-Rgheff, M.A., “Cross-layer signaling for next-generation wireless systems”, IEEE Wireless Communications and Network-ing Conference (WCNC 2003), Vol. 2 , pp. 1084-1089, 16-20 March 2003.

[46] Qi. Wang, Abu-Rgheff M., ”A Multi-Layer Mobility Management Architecture using Cross-Layer Signaling Interactions”, In: Proceeding of EPMCC′03 , Glasgow, Scotland, Apr 2003.

[47] Sanjay. Shakkottai, Theodore S. Rappaort, Peter C. Karlsson, “Cross layer design for wireless networks”, IEEE Communications Magazine, October 2003.

[48] Vijay T. Raisinghani, Sridhar Iyer., “User Managed Wireless Protocol Stacks”, ICDCS, Providence, RI, USA, May 2003.

[49] Raisinghani, V.T.; Singh, A.K.; Iyer, S., “Improving TCP Performance over Mobile Wireless Environments using Cross Layer Feedback”, IEEE International Conference on Personal Wireless Communications, pp. 81–85, 15-17 Dec. 2002.

[50] Byoung-Jo Kim, “A Network Service providing Wireless Channel

Information for Adaptive Mobile Applications: Part I: Proposal”, ICC ’01, June 2001.

[51] Brian Noble, “System Support for Mobile, Adaptive Applications”, IEEE Personal Communications, pp. 44-49, Oct. 2000.

[52] Yulia lndrayani Wijata, Douglas Niehaus, “A Scalable Agent-Based Network Measurement Infrastructure”, IEEE Communicatin Magazine, September 2000.

[53] Julie Harmer , “Mobile aware multimedia applications for UMTS: the ACTS On The Moveproject”, Personal, Indoor and Mobile Radio

[54] Caripe, W., Cybenko, G., Moizumi K., “Network Awareness and Mobile Agent Systems, IEEE Communications Magazine”, 36(7): pp. 44-49, July, 1998.

[55] Chen L.J., Sun T., Chen B., ”A smart decision model for vertical handoff”, In Proceedings 4th ANWIRE International Workshop on Wireless Internet and Reconfigurability (ANWIRE 2004), Athens, Greece, 2004.

[56] Ian F. Akyildiz, Jlang X., Shantidev M. Georgia, “A Survey of Mobility Management in Next-Generation ALL-IP-BASED Wireless Systems”, IEEE Wireless Communications, August 2004.

[57] Christos P., Kar A. Chew, Rahim T., “Multilayer Mobility Management for All-IP Networks: Pure Sip vs. hybrid SIP/Mobile IP”, In The 57th IEEE

Semiannual Vehicular Technology Conference,, pages 2500 – 2504, New York, NY, USA, 22-25 April 2003.

[58] Aust S., Proetel D., Fikouras N.A., et al., “Policy based Mobile IP handoff decision (POLIMAND) using Generic Link Layer Information”, In Proceedings 5th IEEE Int. Conf. Mobile and Wireless Communication Networks, Oct. 2003.

[59] C. Prehofer, W. Kellerer, R. Hirschfeld, et al., “An Architecture Supporting Adaptation and Evolution in Fourth Generation Mobile Communication Systems”, JCN, Vol. 4 No. 4, December 2002.

[60] Michael E. Kounavis, Andrew T. Campbell, “Design, Implementation and Evaluation of Programmable Handoff in Mobile Networks”, ACM Mobile Networking (MONET), Vol.6, pp. 443-461, Sept 2001.

[61] Archan M., Subir D., Prathima A., “Application-Centric Analysis of IP-Based Mobility Management Techniques”, Journal of Wireless

Communications and Mobile Computing, vol. 1, issue 3, Aug 2001.

[62] IEEE 802.11 WG, Part 11, “IEEE Std 802.11-1999: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) specification,” 1999.

[63] R. Droms, “Dynamic Host Configuration Protocol”, IETF RFC 2131, Bucknell University, March 1997.

[64] Jouni M., “HostAP Driver for Intersil Prism 2/2.5/3”, http://hostap.epitest.fi/

[65] Jean T., "Wireless Extensions for Linux",

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html

[66] ”NLANR/DAST : Iperf - The TCP/UDP Bandwidth Measurement Tool”, http://dast.nlanr.net/Projects/Iperf/

[67] “戶空間於內核空間之間的通信接口”,

http://www.kernelchina.org/linuxkernel/chapter3.pdf

附錄A. 中介軟體 WinME 說明文件

A.1.

命令

A.1.1. 系統命令

A.1.1.1. GET_ALL_NETWORK_INTERFACE

取得目前系統上的所有網路界面。

Table A-1 GET_ALL_NETWORK_INTERFACE 的 win_cmd 欄位說明

i8_cmd GET_ALL_NETWORK_INTERFACE pv_param 無作用

pv_value 傳回目前系統上的網路界面。

訊息格式如下:

Figure A-1 GET_ALL_NETWORK_INTERFACE 的 pv_value 格式

欄位名稱 長度 型別 欄位說明

Interface Num

1 byte INT8 表示有幾個網路界面的資訊 被傳回。

Link ID 1 byte INT8 網路界面的 ID,用來分辨不同 的界面。

Link Type 1 byte INT8 網路界面的型態。

Link Name 9 bytes CHAR[] 以 NULL 結尾的字串,為系統 內網路界面的名稱。在 Linux 系統可能為 eth0、wlan0。

A.1.1.2. GET_BATTERY_POWER

取得目前系統剩餘電力,適用於使用電池的裝置。

Table A-2 GET_BATTERY_POWER 的 win_cmd 欄位說明

i8_cmd GET_BATTERY_POWER pv_param 沒作用

pv_value 為一 INT8 的值。介於 0 ~ 100。代表目前系統剩餘電力。

A.1.2. 硬體驅動程式命令

A.1.2.1. SET_POA

針對指定的網路界面卡設定接取點 (POA)。

Table A-3 SET_POA 的 win_cmd 欄位說明

i8_cmd SET_POA

pv_param 指定網路界面要連接哪個接取點。

訊息格式如下:

Figure A-2 SET_POA 的 pv_param 格式

欄位名稱 長度 型別 說明

Link ID 1byte INT8 指定網路界面卡。

POA Info 說定接取點資訊。接取點資訊會

因為網路界面卡的型態不同而有 不同的值。

以下列出不同網路界面卡型態時所要的接取點資訊:

LINK_TYPE_802_11:

Figure A-3 802.11 網路下,SET_POA 的 pv_param 格式

Table A-4 802.11 網路下,SET_POA 的 pv_param 格式欄位說明

欄位名稱 長度 型別 說明

Link ID 1byte INT8 指定網路界面卡。

ESSID 32bytes CHAR[32] 表示 ESSID,為 0 結尾的字 串。如果沒填表示不改變目前 設定。

BSSID 6bytes CHAR[6] 表示 AP 的 BSSID。全填 0 表示不指定 BSSID。

Channel 1 byte INT8 指定 AP 所在的 Channel。 0 表示不指定。

pv_value 無作用。

A.1.2.2. GET_POA

取得指定網路界面卡的接取點資訊。

Table A-5 GET_POA 的 win_cmd 欄位說明

i8_cmd GET_POA

pv_param 為一 INT8 的值。表示 Link ID。

pv_value 傳回指定網路卡的接取點資訊。在 802.11 中為 AP 資訊。

訊息格式如下:

Figure A-4 GET_POA 的 pv_value 格式

欄位名稱 長度 型別 說明

Link Type 1byte INT8 表示網路界面卡的型態,接取點

POA Info 接取點資訊。

以下列出不同 Link Type 時的接取點資訊:

LINK_TYPE_802_11:

Figure A-5 802.11 網路下,GET_POA 的 pv_value 格式

Table A-6 802.11 網路下,GET_POA 的 pv_value 格式欄位說明

欄位名稱 長度 型別 說明

Link Type 1byte INT8 為 LINK_TYPE_802_11 ESSID 32bytes CHAR[32] 表示 ESSID,為 0 結尾的字

串。

BSSID 6bytes CHAR[6] AP 的 BSSID。

Channel 1 byte INT8 AP 所在的 Channel。

A.1.2.3. POA_SCAN

針對指定的網路界面下達掃描鄰近接取點 (POA) 的命令。POA (point of attachment ) 在 802.11 的網路下為AP (Access Point)。掃描結束後會由事件來通 知,請參考 A.2.2.8。

Table A-7 POA_SCAN 的 win_cmd 欄位說明

i8_cmd POA_SCAN

pv_param 為一INT8 的值。表示Link ID,用來指定由哪個網路界面來作掃描 的動作。Link ID的取得可參考 A.1.1.1。

pv_value 無作用。

A.1.2.4. GET_SIGNAL_STRENGTH

取得指定網路卡和所連接的 POA 的訊號強度。

Table A-8 GET_SIGNAL_STRENGTH 的 win_cmd 欄位

i8_cmd GET_SIGNAL_STRENGTH pv_param 為 INT8 型別。

表示 Link ID,用來指定網路界面。

pv_value 為 INT8 型別。

傳回訊號強度。以百分比為單位。

A.1.2.5. SET_SIGNAL_THRESHOLD

設定訊號強度的門檻 (Threshold) 以百分比為單位 100 為最強,0 為最弱 。 當程式開發者不想要定期的去取得目前網路界面所連結的POA的訊號強度時,可 藉由設定signal threshold來讓中介軟體在訊號強度跨過指定的門檻時以事件的方 式通知。相關事件可參考 A.2.2.9。為了防止訊號強度波動會一直跨過門檻,中 介軟體提供設定AVOID_PINGPONG_VALUE的命令。

當 (目前訊號強度 > AVOID_PINGPONG_VALUE + SIGNAL_THRESHOLD) 時才會收到訊號強度大於門檻的事件。

當 (目前訊號強度 < SIGNAL_THRESHOLD – AVOID_PINGPONG_VALUE) 時才會收到訊號強度小於門檻的事件。

Figure A-6 訊號強度和訊號門檻等關係圖

Table A-9 SET_SIGNAL_THRESHOLD 的 win_cmd 欄位

i8_cmd SET_SIGNAL_THRESHOLD pv_param 設定某張網路界面卡的訊號門檻。

訊息格式如下:

Figure A-7 SET_SIGNAL_THRESHOLD 的 pv_param 格式

欄位名稱 長度 型別 說明

Link ID 1byte INT8 用來指定網路界面。

Threshold 1byte INT8 設定訊號門檻。值為 1 – 100。以 百分比為單位。

pv_value 無作用。

A.1.2.6. GET_SIGNAL_THRESHOLD

查詢目前網路界面的訊號門檻。

Table A-10 GET_SIGNAL_THRESHOLD 的 win_cmd 欄位

i8_cmd GET_SIGNAL_THRESHOLD pv_param 為 INT8 型別。

表示 Link ID,用來指定網路界面。

pv_value 為 INT8 型別。

pv_value 為 INT8 型別。