• 検索結果がありません。

PowerPoint プレゼンテーション

N/A
N/A
Protected

Academic year: 2021

シェア "PowerPoint プレゼンテーション"

Copied!
26
0
0

読み込み中.... (全文を見る)

全文

(1)

© 2018 National Institute of Information and Communications Technology

2018年8月30日(木)

Ceforeアプリ開発ツール

cefpyco

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

(2)

© 2018 National Institute of Information and Communications Technology

目次

cefpycoの概要

cefpycoのインストール

cefpycoを用いた通信

cefnetdへの接続

Dataパケットの送信

*1

Interestパケットの送信

 パケットの受信

 簡易Consumerアプリの作成

 簡易Producerアプリの作成

 サンプルアプリ

CefApp

第12回 ICN研究会ワークショップ ハンズオン *1: 本スライドではCob(Content Object)をDataまたはDataパケットと呼称

(3)

© 2018 National Institute of Information and Communications Technology

2018/8/30(木)

第12回 ICN研究会ワークショップ ハンズオン

cefpycoの概要

cefpyco (CEFore PYthon COmpact package)

ceforeアプリ開発用のpythonパッケージ

C言語で開発するより記述が楽

• 例: Interest を送るコード

1#include <stdio.h> 2#include <stdlib.h> 3#include <unistd.h> 4#include <ctype.h> 5#include <cefore/cef_define.h> 6#include <cefore/cef_client.h> 7#include <cefore/cef_frame.h> 8#include <cefore/cef_log.h> 9

10int main(int argc, char *argv[]) {

11 CefT_Client_Handle fhdl;

12 CefT_Interest_TLVs params_i;

13 int res;

14 cef_log_init ("cefpyco");

15 cef_frame_init();

16 res = cef_client_init(port_num, conf_path);

17 if (res < 0) return -1;

18 fhdl = cef_client_connect();

19 if (fhdl < 1) return -1;

20 memset(&params_i, 0, sizeof(CefT_Interest_TLVs));

21 res = cef_frame_conversion_uri_to_name("ccn:/test", params_i.name);

22 if (res < 0) return -1; // Failed to convert URI to name.;

23 params_i.name_len = res;

24 params_i.hoplimit = 32;

25 params_i.opt.lifetime_f = 1;

26 params_i.opt.lifetime = 4000ull; /* 4 seconds */

27 params_i.opt.symbolic_f = CefC_T_OPT_REGULAR;

28 params_i.chunk_num_f = 1;

29 params_i.chunk_num = 0;

30 cef_client_interest_input(fhdl, &params_i);

31 if (fhdl > 0) cef_client_close(fhdl); 32 return 0; 33 }

C言語版

Python版

1 import cefpyco 2 3 with cefpyco.create_handle() as h: 4 h.send_interest("ccn:/test", 0)

33行→4行

(4)

© 2018 National Institute of Information and Communications Technology

cefpycoのダウンロード

https://cefore.net/download

> Utilities > cefpyco

 マニュアル(README.html)付属

*1

*1: 2018/8/30現在は日本語マニュアルのみ

ここをクリック

(5)

© 2018 National Institute of Information and Communications Technology

ビルドとインストール

 ライブラリのインストール

cefpycoのビルド

$ sudo apt-get install cmake python-pip

$ sudo pip install setuptools click numpy

$ tar -xzf cefpyco-0.2.1.tar.gz

$ cd cefpyco-0.2.1/cefpyco

$ cmake .

$ sudo make install

$ cd ..

$ sudo python

>> import cefpyco

>> (Ctrl-D)

# 任意のディレクトリにアーカイブを解凍

# “.”のつけ忘れに注意

# pythonでインポートして起動確認

# エラーが起きなければ正常

# Ctrl-D を押して終了

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

(6)

© 2018 National Institute of Information and Communications Technology

トラブルシューティング

Macでpipがインストールできない

 以下を実行

$ brew install pyenv

$ pyenv install 3.7.0

$ pyenv versions # インストールversionの確認

$ sudo easy_install pip

(7)

© 2018 National Institute of Information and Communications Technology

(再掲)バッファチューニング

Linux OS

Mac OS

2018/8/29(水) 第12回 ICN研究会ワークショップ ハンズオン

$

sudo

sysctl –w net.core.rmem_default=10000000

$

sudo

sysctl –w net.core.wmem_default=10000000

$

sudo

sysctl –w net.core.rmem_max=10000000

$

sudo

sysctl –w net.core.wmem_max=10000000

$

sudo

sysctl –w net.local.stream.sendspace=2000000

(8)

© 2018 National Institute of Information and Communications Technology

cefpycoを用いた通信

① cefnetdへの接続

create_handle()メソッド

② Dataパケットの送信

send_data(name chunk_num, payload)メソッド

③ Interestパケットの送信

send_interest(name, chunk_num)メソッド

④ パケットの受信

receive()メソッド

⑤ 簡易Consumerアプリの作成

⑥ 簡易Producerアプリの作成

register(name)メソッド

第12回 ICN研究会ワークショップ ハンズオン

(9)

© 2018 National Institute of Information and Communications Technology

①cefnetdへの接続

1. 以下の内容のpythonファイルtest1.pyを作成

2. cefnetdを起動して実行(エラーが無ければ正常)

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

import

cefpyco

with

cefpyco.create_handle()

as

handle:

pass

# ブロック開始時にcefnetdへ接続、終了時に切断

test1.py

cefore

:~/cefpyco-0.2.1$

sudo csmgrdstart # if needed

cefore

:~/cefpyco-0.2.1$

sudo cefnetdstart

cefore

:~/cefpyco-0.2.1$

sudo python test1.py

2018-08-30 15:14:00.123 [cefpyco] INFO: [client]

Config directory is /usr/local/cefore

2018-08-30 15:14:00.123 [cefpyco] INFO: [client]

Local Socket Name is /tmp/cef_9896.0

2018-08-30 15:14:00.123 [cefpyco] INFO: [client]

Listen Port is 9896

(10)

© 2018 National Institute of Information and Communications Technology 第12回 ICN研究会ワークショップ ハンズオン

C言語等のセミコロンや括弧の代わりにインデントで文・ブロックを表現

with構文:煩雑な開始/終了/例外処理を省略できる文法

 代表例:ファイルオープン・クローズ

補足:pythonの文法

# a=1, b=1のときはbと表示 # a=1, b≠1のときはaと表示 # a≠1のときは何もしない if a == 1: if b == 1: print(“b“) else: print(“a“) i f a = = 1 : p r i n t ( “ c o r r e c t “ ) e l s e : p r i n t ( ” e r r o r ” ) p r i n t ( “ e r r o r “ ) Tab文字 エ ラ ー 例 • 空 白 4 文 字 と 空 白 2 文 字 • 空 白 4 文 字 と タ ブ 1 文 字 ブロックの範囲を 一目で見分けられる インデント幅が揃っていないとバグ扱いなので要注意 print(“Begin.“) try: h = cefpyco.CefpycoHandle() h.begin() print(“Do something.“) except Exception as e: print(e) # 例外処理 finally: h.end() print(“End.“) with構文無しの場合 print(“Begin.“) with cefpyco.create_handle() as h: print(“Do something.“) print(“End.“) with構文を用いた場合

(11)

© 2018 National Institute of Information and Communications Technology

②Dataパケットの送信

1. 以下の内容のpythonファイルtest2.pyを作成

2. csmgrd・cefnetdを起動して実行

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

import

cefpyco

with

cefpyco.create_handle()

as

handle:

# ccn:/testというコンテンツ名・チャンク番号0で

# helloというテキストコンテンツをDataパケットとして送信

handle.send_data("ccn:/test", 0, "hello")

test2.py

cefore

:~/cefpyco-0.2.1$

sudo csmgrdstart

cefore

:~/cefpyco-0.2.1$

sudo cefnetdstart

cefore

:~/cefpyco-0.2.1$

sudo python test2.py

cefore

:~/cefpyco-0.2.1$ csmgrstatus ccn:/

***** Cache Status Report *****

Number of Cached Contents : 1

[0]

Content Name : ccn:/test/

Content Size : 5 Bytes

Access Count : 0

csmgrdに

Dataが

アップロード

される

(12)

© 2018 National Institute of Information and Communications Technology

③Interestパケットの送信

1. 以下の内容のpythonファイルtest3.pyを作成

2. (test2.py実行後に)test3.pyを実行

第12回 ICN研究会ワークショップ ハンズオン

import

cefpyco

with

cefpyco.create_handle()

as

handle:

# ccn:/testというコンテンツの0番目のチャンクを

# 要求するInterestパケットを送信

handle.send_interest("ccn:/test", 0)

test3.py

# (test2.pyのシナリオを実行)

cefore

:~/cefpyco-0.2.1$

sudo python test3.py

cefore

:~/cefpyco-0.2.1$ csmgrstatus ccn:/

***** Cache Status Report *****

Number of Cached Contents : 1

[0]

Content Name : ccn:/test/

Content Size : 5 Bytes

Access Count : 1

Access Count

が1だけ増加

(13)

© 2018 National Institute of Information and Communications Technology

④パケットの受信

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

 以下のコードでパケットを受信可能

receive()メソッド

 実行後、約4秒の間 パケットを待ち受ける

• 成功するまで受信したい場合はwhileループ等が必要

CcnPacketInfoオブジェクトを返す

• 受信の成否やInterest/Dataに依らない

• プロパティ一覧は次ページで説明

import

cefpyco

with

cefpyco.create_handle()

as

handle:

handle.send_interest(

“ccn:/test”

,

0

) # Dataパケットを受信したい場合

# handle.register(

“ccn:/test”

) # Interestパケットを受信したい場合

(14)

© 2018 National Institute of Information and Communications Technology

CcnPacketInfoのプロパティ

第12回 ICN研究会ワークショップ ハンズオン

プロパティ名

説明

is_succeeded, is_failed bool

パケット受信の成否フラグ

is_interest, is_data

bool

受信したパケットがInterest/Dataか否かを表すフラグ

(受信失敗時には両方ともFalseとなる)

name

string

URI形式(ccn:/~)の名前

name_len

int

URI形式の名前の長さ(name TLV長ではない)

chunk_num

int

チャンク番号

payload

string

(Dataパケットの場合)コンテンツのデータ

payload_len

int

(Dataパケットの場合)コンテンツのデータのバイト長

version

int

受信パケットのバージョン値

type

int

受信パケットのタイプ値

(15)

© 2018 National Institute of Information and Communications Technology

from

time

import

sleep

import

cefpyco

with

cefpyco.create_handle()

as

handle:

while

True

:

handle.send_interest(

"ccn:/test"

,

0

)

info

=

handle.receive()

if

info.is_succeeded

and

(info.name

==

"ccn:/test“)

and

(info.chunk_num

==

0)

:

print

(

"Success"

)

print

(info)

break

sleep(

1

)

⑤簡易Consumerアプリの作成

 以下の内容のpythonファイルconsumer.pyを作成

 チャンクが1個しかないコンテンツccn:/testを受信

 受信に成功するまで

receiveメソッドを繰り返す

 穴埋め問題:

 受信した

CcnPacketInfoを見て受信に成功したか否か

を検証するif文を完成させよう

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

consumer.py

(16)

© 2018 National Institute of Information and Communications Technology

⑤簡易Consumerアプリの作成:解答

 以下の内容のpythonファイルconsumer.pyを作成

 チャンクが1個しかないコンテンツccn:/testを受信

 受信に成功するまで

receiveメソッドを繰り返す

 穴埋め問題:

 受信した

CcnPacketInfoを見て受信に成功したか否か

を検証するif文を完成させよう

第12回 ICN研究会ワークショップ ハンズオン

from

time

import

sleep

import

cefpyco

with

cefpyco.create_handle()

as

handle:

while

True

:

handle.send_interest(

"ccn:/test"

,

0

)

info

=

handle.receive()

if

info.is_succeeded

and

(info.name

==

"ccn:/test“)

and

(info.chunk_num

==

0)

:

print

(

"Success"

)

print

(info)

break

sleep(

1

)

(17)

© 2018 National Institute of Information and Communications Technology

consumer.pyの動作例

2018/8/30(木)

第12回 ICN研究会ワークショップ ハンズオン

cefore:~/cefpyco-0.2.1$ sudo csmgrdstart …

cefore:~/cefpyco-0.2.1$ sudo cefnetdstart …

cefore:~/cefpyco-0.2.1$ echo hello > test; cefputfile ccn:/test …

cefore:~/cefpyco-0.2.1$ sudo python consumer.py [cefpyco] Configure directory is /usr/local/cefore

2018-08-30 15:16:00.123 [cefpyco] INFO: [client] Config directory is /usr/local/cefore 2018-08-30 15:16:00.123 [cefpyco] INFO: [client] Local Socket Name is /tmp/cef_9896.0 2018-08-30 15:16:00.123 [cefpyco] INFO: [client] Listen Port is 9896

2018-08-30 15:16:00.123 [cefpyco] INFO: Send interest (name: ccn:/test, #chunk: 0) Success

Info: Succeeded to receive Data packet with name 'ccn:/test' (#chunk: 0) and payload 'hello' (6 Bytes)

ccn:/testという名前の

コンテンツの0番目のチャンクの

取得に成功

(18)

© 2018 National Institute of Information and Communications Technology

import

cefpyco

with

cefpyco.create_handle()

as

handle:

handle.register("ccn:/test")

while

True

:

info

=

handle.receive()

if

info.is_succeeded

and

(info.name

==

"ccn:/test“)

and

(info.chunk_num

==

0)

:

handle.send_data(

"ccn:/test"

,

0

,

"hello"

)

# break # Uncomment if publisher provides content once

⑥簡易Producerアプリの作成

 以下の内容のpythonファイルproducer.pyを作成

Interestを受信するにはregisterメソッドを用いる

• register(prefix): cefnetdがInterestを受信した際に、

Interestの名前とprefixが一致する場合はアプリに送るよ

うに登録するためのメソッド

 穴埋め問題:

”ccn:/test”宛のInterestを受け取ったら”hello”とい

う文字列を返すifブロックを完成させよう

第12回 ICN研究会ワークショップ ハンズオン

producer.py

(19)

© 2018 National Institute of Information and Communications Technology

⑥簡易Producerアプリの作成:解答

 以下の内容のpythonファイルproducer.pyを作成

Interestを受信するにはregisterメソッドを用いる

• register(prefix): cefnetdがInterestを受信した際に、

Interestの名前とprefixが一致する場合はアプリに送るよ

うに登録するためのメソッド

 穴埋め問題:

”ccn:/test”宛のInterestを受け取ったら”hello”とい

う文字列を返すifブロックを完成させよう

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

import

cefpyco

with

cefpyco.create_handle()

as

handle:

handle.register("ccn:/test")

while

True

:

info

=

handle.receive()

if

info.is_succeeded

and

(info.name

==

"ccn:/test“)

and

(info.chunk_num

==

0)

:

handle.send_data(

"ccn:/test"

,

0

,

"hello"

)

# break # Uncomment if publisher provides content once

(20)

© 2018 National Institute of Information and Communications Technology

producer.pyの動作例

csmgrdを無効にしてから、2つの端末で以下を実行

第12回 ICN研究会ワークショップ ハンズオン

cefore:~/cefpyco-0.2.1$ sudo cefnetdstart …

cefore:~/cefpyco-0.2.1$ sudo python producer.py [cefpyco] Configure directory is /usr/local/cefore

2018-08-30 15:19:00.123 [cefpyco] INFO: [client] Config directory is /usr/local/cefore 2018-08-30 15:19:00.123 [cefpyco] INFO: [client] Local Socket Name is /tmp/cef_9896.0 2018-08-30 15:19:00.123 [cefpyco] INFO: [client] Listen Port is 9896

端末1(producer)

cefore:~/cefpyco-0.2.1$ sudo python consumer.py [cefpyco] Configure directory is /usr/local/cefore

2018-08-30 15:19:10.123 [cefpyco] INFO: [client] Config directory is /usr/local/cefore 2018-08-30 15:19:10.123 [cefpyco] INFO: [client] Local Socket Name is /tmp/cef_9896.0 2018-08-30 15:19:10.123 [cefpyco] INFO: [client] Listen Port is 9896

2018-08-30 15:19:10.123 [cefpyco] INFO: Send interest (name: ccn:/test, #chunk: 0) Success

Info: Succeeded in receiving Data packet with name 'ccn:/test' (#chunk: 0) and payload 'hello' (5 Bytes)

端末2(consumer)

コンテンツ配布開始

(21)

© 2018 National Institute of Information and Communications Technology

サンプルアプリ CefApp

cefpyco/cefappディレクトリ内の2つのアプリ

cefappconsumer.py: Consumerアプリ

cefappproducer.py: Producerアプリ

 特徴

 先ほどの簡易アプリと異なり、複数チャンクから成る

コンテンツの送受信に対応

 入出力はインライン・標準入出力・ファイルの3種類

cefappconsumerはパイプライン処理を実装

 詳細な使用法は

README 5章参照

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

(22)

© 2018 National Institute of Information and Communications Technology

CefApp動作例

第12回 ICN研究会ワークショップ ハンズオン

cefore:~/cefpyco-0.2.1$ sudo cefnetdstart …

cefore:~/cefpyco-0.2.1$ ./cefappproducer.py ccn:/test hello [cefpyco] Configure directory is /usr/local/cefore

YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: [client] Config directory is /usr/local/cefore YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: [client] Local Socket Name is /tmp/cef_9896.0 YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: [client] Listen Port is 9896

[cefapp] Receiving Interest...

端末1(producer)

cefore:~/cefpyco-0.2.1$ sudo ./cefappconsumer.py ccn:/test [cefpyco] Configure directory is /usr/local/cefore

YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: [client] Config directory is /usr/local/cefore YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: [client] Local Socket Name is /tmp/cef_9896.0 YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: [client] Listen Port is 9896

YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: Send interest (name: ccn:/test/meta, #chunk: 0) YYYY-MM-DD hh:mm:ss.xxx [cefpyco] INFO: Send interest (name: ccn:/test, #chunk: 0)

[cefapp] Succeed to receive. hello

端末2(consumer)

コンテンツ配布開始

(23)

© 2018 National Institute of Information and Communications Technology

発展課題

 複数チャンクの送受信を試してみよう

send_interestやsend_dataをチャンク数に応じて複数

回実行するしてみよう

 チャンク数を事前に知らなくても良い方法を考えよう

• 例:Dataが返ってこなくなるまでInterestを送る、チャ

ンク数通知用のコンテンツを作る、etc.

cefgetfile/cefputfileと同等の機能を作ってみよう

 ファイルを読み書きして送受信できるようにしよう

 大きなファイルに対応するためのパイプライン処理を

作ってみよう

• CefAppのコード等を参考

cefpyco/c_src/cefpyco.cやceforeのツールを参考に、

C言語でアプリを作ってみよう

2018/8/30(木) 第12回 ICN研究会ワークショップ ハンズオン

Advanced

(24)

© 2018 National Institute of Information and Communications Technology

主要なアプリ開発用API(C言語)

第12回 ICN研究会ワークショップ ハンズオン

関数名 引数 説明

cef_frame_init() 無し cef_frame_xxx()を使用する場合、最初に1度だけ実行。 cef_frame_conversion_uri_to_name • const char* name: URIを表す文字列• unsigned char* dst: TLVバイト列の書込先 URI形式の文字列(ccn:/~)をTLV(Type-Length-Value)バイト列形式に変更する。TLVのバイト長を返す(int)。 cef_frame_conversion_name_to_uri •• unsigned char* tlv: TLVを表すバイト列unsigned int tlv_len: TLV長

• char * dst: URIの書込先

TLV形式のバイト列をURI形式に変更する。URIのバイト 長を返す(int)。

cef_client_connect 無し UNIXドメインソケットとしてアプリとcefnetd間の接続を確立し、そのコネクションを管理するためのハンド ルを返す(CefT_Client_Handle)。

cef_client_close • CefT_Client_Handle fhdl: cef_client_connetctで生成したcefnetdとのハンドル cefnetdとの接続を終了する。

cef_client_interest_input • CefT_Client_Handle fhdl: 同上CefT_Interest_TLVs: Interest作成用パラメータ パラメータで指定されたInterestパケットを生成し、cefnetdに送る。 cef_client_object_input • CefT_Client_Handle fhdl: 同上

• CefT_Object_TLVs: Data作成用パラメータ

パラメータで指定されたDataパケットを生成し、 cefnetdに送る。

cef_client_read •• CefT_Client_Handle fhdl: 同上unsinged char* dst: 受信データの書込先 • int dst_len: 書込先のバイト長

cefnetdからパケットを受信し、dstに書き込む。複数の メッセージが連結されている可能性がある。受信した 全メッセージのバイト長を返す(int)。

cef_client_payload_get_with_info

• unsigned char * buf: cef_client_readで受信し たバイト列 • int buf_len: バイト長 • struct cef_app_frame* dst: 受信データ書込先 cefnetdから受け取ったメッセージから1パケット分の Dataパケットを読み込み、struct cef_app_frameに格納 する(Interestパケットは非対応)。読み残したメッセー ジ長を返す(int)。 cef_client_name_reg • CefT_Client_Handle fhdl: 同上 • uint16_t command: 命令

• const unsigned char * name: name TLV • uint16_t name_len: name TLV長

cefnetdからInterestを受信するために、cefnetdに名前 を登録(もしくは登録解除)する。commandに CefC_App_Regを指定すると登録、CefC_App_DeRegを 指定すると登録解除する。

cef_client_prefix_reg 同上 cef_client_name_regはnameが完全一致するInterestのみ受け取るが、これはプレフィックスマッチするInterest を受け取れる。

※cefore 0.7.2a時点ではInterestのパース関数は無い(cefpyco/c_src/cefparse/cpcparse_interest.c等を参考) ※ 要include: cefore/cef_frame.h, cefore/cef_client.h, cefore/cef_define.h

(25)

© 2018 National Institute of Information and Communications Technology

主要なアプリ開発用構造体(C言語)

変数名 説明

uint8_t hoplimit 固定ヘッダに設定される最大ホップ数。 unsigned char name[x] Name TLV。

uint16_t name_len Name長(単位:バイト)。

uint8_t chunk_num_f チャンク番号をName TLVに含める場合は非0 を設定。

uint32_t chunk_num Name TLVに含めるチャンク番号。

uint8_t nonce_f NonceをName TLVに含める場合は非0を設定。 uint64_t nonce Name TLVに含めるNonce値(0可)。

Nameが一致してもNonce値が異なる場合、 PITエントリ作成時に集約されなくなる。 CefT_Option_TLVs opt Hop-by-hop Optionヘッダに追加するパラ

メータ。

2018/8/30(木)

第12回 ICN研究会ワークショップ ハンズオン

変数名 説明 対象パケット

uint8_t lifetime_f Lifetimeを設定する場合は非0を設定 Interest uint16_t lifetime Lifetimeをミリ秒で設定(0可) Interest uint8_t cachetime_f Recommended Cache Time (RCT)を設

定する場合は非0を設定 Content Object uint64_t cachetime Recommended Cache Time (RCT)をミ

リ秒で設定(0可) Content Object uint16_t symbolic_f Symbolic識別子

Regular Interest: 0x0000 Long Life Interest: 0x0001

Interest

変数名 説明

unsigned char name[x] Name TLV。

uint16_t name_len Name長(単位:バイト)。

uint8_t chunk_num_f チャンク番号をName TLVに含める場合は非0 を設定。

uint32_t chunk_num Name TLVに含めるチャンク番号。 unsigned char meta[x] Meta Data。

uint16_t meta_len Meta Data長(単位:バイト)。

CefT_Option_TLVs opt Hop-by-hop Optionヘッダに追加するパラ メータ。

unsigned char payload[x] ペイロードとなるバイト列。 uint16_t payload_len ペイロード長(単位:バイト)。

uint64_t expiry Content Objectの有効期限(UNIX Time、単 位:ミリ秒)。

変数名 説明

uint32_t version CefC_App_Version(0xCEF00101) uint32_t type CefC_App_Type_Internal(0x10000000) uint64_t actual_data_len 実有効データ長(version~payload_lenまでの長

さ+name_len+

payload_len+CefC_App_Magic_Noサイズ (4byte))。

unsigned char* name data_entityに格納したname部の先頭アドレス。 uint16_t name_len name長。

uint32_t chunk_num チャンク番号。

unsigned char* payload data_entityに格納したpayload部の先頭アドレス。 uint16_t payload_len payload長。

unsigned char data_entity[Cef C_Max_Length] name、payloadの実体を前詰めで格納し、最後 にトレイラ(CefC_App_Magic_No)を設定する。 最大65535バイト。 CefT_Interest_TLVs CefT_Object_TLVs CefT_Option_TLVs struct cef_app_frame

(26)

© 2018 National Institute of Information and Communications Technology

参照

関連したドキュメント

30 2/18 第41回江田島市駅伝大会 共催 市内外の 67 チームが参加。. 30 3/11

Type of notification: Customers must notify ON Semiconductor (&lt;[email protected] &gt;) in writing within 90 days of receipt of this notification if they consider

平成30年5月11日 海洋都市横浜うみ協議会理事会 平成30年6月 1日 うみ博2018開催記者発表 平成30年6月21日 出展者説明会..

*一般社団法人新エネルギー導入促進協議会が公募した 2014 年度次世代エネルギー技術実証事業

4 OCHA, Iraq Humanitarian Response Plan 2018, February 2018, pp5-8; OCHA, Iraq: Humanitarian Bulletin, August 2018(issued on 31 August 2018), p2. 5 OCHA, Iraq Humanitarian

 ライフ・プランニング・センターは「真の健康とは何

特定非営利活動法人 Cloud JAPAN 2017年度報告書 2018 年 6 月 11 日 第1版 発行 2018 年 6 月 26 日 第2版 発行. 〒988-0224 宮城県気仙沼市長磯前林 55 番地

2018年 1月10日 2つの割引と修理サービスの特典が付いた「とくとくガス床暖プラン」の受付を開始 2018年