Japan QualNet Community Forums Japan QualNet Community Forums
Welcome Guest 
ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
検索
メインメニュー
アクセスカウンター
2024/05/14:6/6
2024/05/13:21/24

2024/03/15より388/1397
人気モジュール
No.1: フォーラム 39
No.2: ニュース 2
日曜日からの合計
人気Browser&OS
No.1:巡回ロボット34
No.2:Unknown OS1

No.1:どっかの巡回ロボット29
No.2:Google巡回ロボット3
No.3:Majestic-12巡回ロボット2

日曜日からの合計
メイン
   Tools: QualNet Analyzer & QualNet Packet Tracer
     プロトコルの書き方について
投稿するにはまず登録を

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
kento
投稿日時: 2006/10/11 21:06
新米
登録日: 2006/10/10
居住地:
投稿: 3
プロトコルの書き方について
qualnetの初心者です。トランスポート層で新たにプロトコルを追加しようと考えています。programmers guideを読んでいますがどうすればよくわかりません。どのような手順を踏めばかけるようになるか教えて頂けませんか?よろしくお願いします。
mast
投稿日時: 2006/10/12 0:04
一人前
登録日: 2005/4/7
居住地:
投稿: 93
Re: プロトコルの書き方について
プログラマーズガイドのAdding a Transport Layer Protocolという節に以下の手順が書いてあるので、まずはこれらを1つずつ実行していって、行き詰ったところでその箇所について議論を進めてみては如何でしょうか?でないと、、、質問が漠としすぎてるので、たぶん誰も教えてくれないか、良くて「RTFM!」と言われるだけかと思いますたぶん。

1. Create header and source files.
2. Modify the file transport.cpp to include the protocol's header file.
3. Include the protocol in the list of Transport Layer protocols and trace protocols.
4. Define data structures for the protocl.
5. Decide on the format for the protocol-specific configuration parameters.
6. Read the protocol's configuration parameters and call the protocol's initialization function from the Transport Layer initialization function, TRANSPORT_Initialize.
7. Write the initialization function for the protocol. The initialization function should include the following tasks:
 a. Declare and initialize the state variables.
 b. Initialize timers.
8. Call the protocol event dispatcher from the Transport Layer event dispatcher, TRANSPORT_ProcessEvent.
9. Declare any new event types used by the protocol in the header file QUALNET_HOME/include/api.h.
10. Write the protocol event dispatcher.
11. Integrate the protocol with the Network Layer.
 a. Define an IP Protocol Number for the protocol.
 b. Write a function to deliver packets from IP to the protocol.
 c. Call the function to deliver packets from IP to the protocol from the IP function DeliverPacket.
12. Include code in various functions to collect statistics.
 a. Declare statistics variables.
 b. Initialize the statistics variables in the protocol's initialization function.
 c. Update the statistics as appropriate.
 d. Write a function to print the statistics.
13. Call the protocol finalization function from the Transport Layer finalization function, TRANSPORT_Finalize.
14. Write the protocol finalization function. Call the function to print statistics from the protocol finalization function.
15. Include the protocol header and source files in the QualNet tree and compile.
kento
投稿日時: 2006/10/12 6:50
新米
登録日: 2006/10/10
居住地:
投稿: 3
Re: プロトコルの書き方について
返信ありがとうございます。
早速やってみます。
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ
Copyright c KOZO KEIKAKU ENGINEERING Inc. All Rights Reserved.
XOOPS Cube PROJECT