2021/06,江端さんの忘備録

―― テレワークって、我慢を強いる仕事なの?

"Teleworking needs a lot of patience?"

って思ってしまうのは、私の特殊な環境から生じる奢(おご)りだと思っています。

I think it's based on my own special environment, and my arrogance.

私は、19歳の時にパソコンを触ってから、3日以内には必ずキーボードを使ってきました。

I have always used a keyboard within three days until I was 19 years old.

もはやパソコンは体の一部です。

Computer is now a part of my body.

なので、テレワークそのものに苦痛はありません。

So, I don't feel pain in teleworking itself.

ただ、今回の『東京五輪期間中のテレワーク徹底方針に、多くの人が激怒している』のニュースが出ていますが、これは、ITリテラシーの話とは別論のようです。

This news of "Many people are furious about teleworking policy during the Tokyo Olympics" seems to be a different argument from a problem about IT literacy.

-----

世の中の仕事の大部分は、パソコン&リモートワークだけで完結する仕事ばかりではありません。

The majority of jobs in the world can't be completed only by computer & remote work.

データを見てみると、コンピュータを使用していない労働者は12.5%ですが、これは、100%コンピュータを使わない業務ということです。

Looking at the data, 12.5% of workers do not use computers, but this doesn't means that 100% of work is computer-based.

100%コンピュータを使わない人は、パートタイム労働者(33.7%)、販売・サービス職(25.2%)と高い水準です。

Those who do not use computers 100% of the time are high among part-time workers (33.7%) and sales and service workers (25.2%).

しかし、実際の業務は、パソコン業務と、非パソコン業務のハイブリッドとなっているはずですので、「テレワークだけでは仕事が成り立たない」という比率は、もっと高いはずです。

However, since actual work is a hybrid of computer and non-computer work, the ratio of "work cannot be accomplished by telework alone" should be much higher.

普通に考えても、清掃、接客、ライン製造、スーパーマーケット、警備、美容師、家事代行、検品、引越し業、介護、農業、漁業、建築業、店員一般は、テレワークが成立しません。

Even if you think about it normally, telework is not viable for cleaning, customer service, line manufacturing, supermarkets, security, hairdressers, housekeeping, inspection, moving businesses, nursing care, farming, fishing, construction, and sales clerks in general.

こちらのデータを見ている限り、「テレワークだけでは成立しない労働人口比率」は"70%"くらいで、多数派です。

As far as I can see from the data here, the "ratio of the working population that cannot be established by telework alone" is about "70%", which is the majority.

私は、たまたま、少数派に属していただけです。

I just happen to be in the minority.

-----

という訳で、

So...

『東京五輪期間中のテレワーク徹底方針に、多くの人が激怒している』の"多くの人"というのは、

"Many people are furious about teleworking policy during the Tokyo Olympics"

マスコミが煽っているのではなく、データから見ても、定量的に"多くの人"です。

is not a media demagogue, but a quantitative "many people" based on the data.

2021/06,江端さんの忘備録

アニメ「スーパーカブ 第10」話で、主人公が雪の中をノーマルタイヤでカブを走らせるシーンが登場します。

In the anime "Super Cub #10" episode, there is a scene where the main character drives the Cub through the snow with normal tires.

雪道の運転は、自動車でも危険です。しかし、バイクの場合、「転倒確定」の危険です。

Driving on snowy roads is dangerous even for cars. However, in the case of motorcycles, it is a "confirmed fall" hazard.

が、まあ、それが分かっていても、避けられない場合があります。

But, well, even if I know that, there are times when it is unavoidable.

例えば、

For example.

―― 午前中、晴天の天気の中に到着した大学の研究室から、深夜3時に豪雪となった京都の街を通過して下宿に帰る時

"From the college laboratory where I arrived in the morning in sunny weather, I have to pass through the city of Kyoto in heavy snowfall at 3 a.m. on my way back to my lodgings"

です。

京都の雪というのは、ライダーにとっては非常にやっかいな雪です。

Snow in Kyoto can be very troublesome for motorcycle riders.

一言で言えば、『簡単に凍けない雪』であって、非常に理想的な(ライダーにとっては最悪の)アイスバーンを、数日間維持し続ける雪です。

In a word, it's snow that doesn't freeze easily, and maintains a very ideal (and the worst for motorcycle riders ) ice burn for several days.

私の場合、従量9kgのラップトップコンピュータ「PC-9801LS」(定価88万6千円)を、ずた袋にいれて、毎日携行していたので(本当です)、バイクなしでの移動というのは、現実的に不可能だったのです。

In my case, I was carrying a 9kg laptop computer "PC-9801LS" (list price 886,000 yen) in a sack every day (it's true), so it was practically impossible for me to move around without a motorcycle.

-----

私、定価88万6千円のコンピュータを、バイトで稼いで、現金で購入しました ―― 学費と生活費を稼ぎながら、です。

I bought the computer with a list price of 886,000 yen in cash with a part-time job -- while earning money for school and living expenses.

私の大学生活は、いわゆる「陽キャ」イベント絶無の日々だったですが、(すでに、何度も記載していますが)別に『自分を不運な奴だ』と思ったことはなかったです。

My university life was filled with no romantic events, but (as I have already mentioned many times) I never thought of myself as an unlucky person.

『余計なことを考えずに済む、充実した激務の日々』 ―― この一言に尽きます。

"The days are full of hard work, and I don't have to think about anything else". That's all I could say.

私の「ボッチ」気質と、「技術大好き」気質が、驚くほど上手く噛み合った幸運だ、と思っています。

I consider myself lucky that my "alone" nature and my "technology-loving" nature mesh surprisingly well together.

それはさておき。

Aside from that.

-----

高校3年生の時、私、北海道大学の受験のついでに、3月の北海道を2週間近く、電車で放浪していました。

When I was a senior in high school, after taking the entrance exam for Hokkaido University, I wandered around Hokkaido by train for almost two weeks in March.

食パンを一斤購入して水で流し込む日々を繰返しながら、周遊券を使って、北海道の各地(というかほぼ全域)を回っていました。

I spent my days repeatedly buying a loaf of bread and pouring it down with water, while using a round trip ticket to visit various parts of Hokkaido (or rather, almost all parts of Hokkaido).

(なんか、この食事自体が、アニメ「スーパーカブ」の主人公と似ています)

(Somehow, this meal itself is similar to the main character in the anime "Super Cub".)

その旅の最中、電車の車窓から

During the journey, I saw

―― 猛吹雪の中、雪をかき散らしながら、爆走する一台のカブ

"a running motorcycle with blowing away snow in a blizzard"

を見ました。

from the train window.

そのライダーのテクニックは、本当に凄かった。

The technique of the rider of that bike was truly amazing.

■雪によって流されていくカブの動きを予測しながら、

- While anticipating the movement of the bike as it is swept away by the snow,

■スピードを落すことなく、

- Without slowing down,

■車体を左右にドラフトさせて、

- Drafting the bike from side to side,

■深雪の道路をラクラクと運転する

- Driving easily on roads with deep snow

■農作業姿のおじいさん

- An old man in farming clothes

実際に、電車と併走していたんだから、凄いスピードです。

In fact, he was running alongside the train, which was a great speed.

―― なんて、かっこいいんだ・・・

"Oh, my God, he is so cool"

私は、窓にしがみついて、カブを運転するおじいさんを、見続けていました。

I clung to the window and kept watching the old man driving the Cub.

-----

今でも、私はあの光景を思い出す度に、『カッコイイとは、こういうことさ』という、ポルコ・ロッソ(アニメ『紅の豚』)の台詞が思い浮びます。

Whenever I remember that scene, I still think of the line from Porco Rosso (the anime "The Red Pig"), "That's what cool is".

2021/06,江端さんの忘備録

国際学会に参加すると、その会期途中に「オプショナルツアー」とう観光ツアーが行われます。

When you participate in an international conference, there will be an "optional tour" or sightseeing tour during the conference.

まあ、大体、国際学会は有名な観光地で実施されることが多いので、学会前の発表準備で、死ぬほど忙しい目にあってきた発表者に対する、ある種の「ごほうび」のようなものです。

Well, international conferences are usually held in famous tourist spots, so it's a kind of "reward" for the presenters who have been busy to death preparing their presentations before the conference.

オリンピックやパラリンピックに、そのような「オプショナルツアー」があるか不明ですが、普通のオリパラであれば、選手達は、開催地の観光を楽しむことができたと思います。

I'm not sure if such "optional tours" exist in the Olympics or Paralympics, but normally the athletes could have enjoyed sightseeing in the host city.

もちろん今回は、日本国政府は、来日するアスリートやプレスに、国内を自由に濶歩させるようなことは、許すはずがありませんが ――

Of course, this time, the Japanese government will not allow athletes and the press to freely walk around the country, but...

私が思うに、「アスリート」や「プレス」というのは、基本的にヤンチャです。

In my opinion, an "athlete" or "press" is essentially a challenger.

多分、彼等は、出没すると思います ―― 浅草や、銀座や、新宿や、渋谷、そして秋葉原に。

Maybe they'll show up in Asakusa, Ginza, Shinjuku, Shibuya, and Akihabara.

数万人が来日したにも関わらず、これを"ゼロ"で終えることができたら、私は、それこそが、「オリパラの大成果」になるだろう、と思っています。

If they can end up with "zero" in spite of tens of thousands of visitors to Japan, I believe that will be the "great achievement of the OLYMPALA".

-----

たぶん"ゼロ"にはならない。

Maybe it will never be zero.

毎日のように、「アスリート」や「プレス」の脱走が、新聞や週刊誌の紙面を賑わらせることになる。

Every day, the escapades of "athletes" and "press" is going to make the pages of newspapers and weekly magazines.

(1)「アスリート」や「プレス」のルール違反が責められるのか

(1) Is the "athlete" or the "press" to blame for breaking the rules?

(2)オリンピック開催委員会のガバナンスコントロールが責められるのか

(2) Are the governance controls of the Olympic host committee to blame?

になるかが、問題です。

will be problems.

日本国政府が、違反した選手団を強制国外退去させる → その国との関係悪化 → 国交断絶 てなことになったら、嫌だなぁ、と危惧しています。

I'm afraid that the Japanese government will force the offending team to leave the country -> will worsen relations with that country -> will break off diplomatic relations.

-----

まあ、私の予想は外れますので、あまり心配していませんが。

Well, my predictions have been off, so I'm not too worried.

以前も、『大統領選挙の開票プロセスで、米国が内戦に突入する。有力州が独立を宣言する』という、ぶっとんだ予測をしていましたが、見事に外しました。

I once predicted that the US presidential election process would plunge the country into civil war. And I had made a wild prediction that the United States would plunge into civil war during the presidential election process, and that the leading states would declare independence.

でも、まあ、『敗北した大統領のシンパによる連邦議会議事堂の襲撃事件があった』ということでは、一部の予測は当たったかな、とは思っていますが。

But, well, I guess some of the predictions came true when 'there was an attack on the US Capitol by sympathizers of the defeated president.

2021/06,江端さんの忘備録

「Numbers 天才数学者の事件ファイル シーズン2、エピソード16」のラストで、FBIに勤める息子と、引退した建築家の父親が、こんな会話をするシーンが出てきます。

At the end of "Numbers: The Case Files of a Mathematical Genius, Season 2, Episode 16, "there is a scene where a son who works for the FBI and his father who is a retired architect have this conversation.

息子:「この過激派め」

Son: "You extremis"

父親:「政府の犬」

Father: "Government dog"

と、言葉を交したあと、お互いにニヤリと笑う。

After exchanging a few words, they grinned at each other.

―― あー、いいなぁ、こういう会話、憧れるなぁ

"Oh, I like it. I admire this kind of conversation"

と、思いながら見ていました。

I watched it with thinking that.

-----

もし、娘たちが、警察や自衛官になったら、こういう会話をしたいと思っていました。

If my daughters became police or self-defense officers, this is the kind of conversation I wanted to have with them.

娘:『転向者』

Daughter: "Convert to conservatism"

私:『権力の犬が』

Me: "This police spy"

といって、お互いに、ウイスキータンブラーを鳴らす ――

And then they clink their whiskey tumblers at each other --

残念ながら、我が家では、こういう会話をする可能性は絶無だと思います。

Unfortunately, I think the chances is not coming in the future.

2021/06,江端さんの忘備録

長女:「"飛び込み自殺"で検索すると、パパのコラムが、トップページの3つめに出てきて、驚いた」

Daughter: "I was surprised to see that when I searched for 'suicide by jumping into a train,' your column came up as the third one on the top page"

と言われたことを思い出して、ちょっと試してみました。

I remembered her telling me that, so I gave it a try.

本当に出てきました。

It's really coming out.

編集担当者の方によれば、このコラムは、飛び込み自殺の事件がある度に、PVカウントが上がるそうです。

According to the editorial staff, the PV count of this column goes up every time whenever "a suicide by jumping into a train" happened.

多分、今日も、PVカウントが上がっているのだと思います。

Maybe today, the PV count is still going up.

-----

私のやったことは、簡単な運動方程式を使った、パソコンによるシミュレーションです。

What I did was a computer simulation, using simple equations of motion.

所詮は、コンピュータの中での「飛び込み自殺」の実験に過ぎません。

After all, it is just a "jumping" experiment in a computer.

ここまで、このコラムのニーズがあるなら、いっそのこと、動物の死体(あるいは、同程度の構成からなる肉塊)を使った実証実験を、国土交通省、または、鉄道会社のコンソーシアムで実施して、そのデータを開示すれば、良いと思います。

If there is such a need for this column, I think it would be a good idea if the Ministry of Land, Infrastructure, Transport and Tourism or a consortium of railroad companies conducted a demonstration experiment using animal carcasses (or meat lumps of similar composition) and disclosed the data.

線路の側に、高速撮影用のカメラを20台くらい設置して、1/100~1/1000秒のコマで撮影して、飛び込み自殺のリアルを記録することも必要でしょう。

It would also be necessary to set up about 20 high-speed cameras on the side of the tracks, shooting at frames of 1/100 to 1/1000 of a second, to record the reality of the suicide by jumping into the train.

もちろん、それらの映像は、PTSDを発症させかねない衝撃的なものになると思います。

Of course, those images would be shocking and could cause PTSD.

公開方法については、厳重かつ慎重に取り扱わなければならないとは思います。

I believe that the method of disclosure must be handled with great care and caution.

-----

私の死後、私は、自分の遺体を「活用(移植)」方向のみで許可を出しています。

After my death, I have given permission for my body to be "utilized (transplanted)" way only.

しかし、こういうコラムを書いた当事者としては、私の遺体を「飛び込み自殺」の実証実験に使って貰うことも、真剣に検討して貰う必要があるかな、と思っています。

However, as the person who wrote this column, I think I need to ask them to seriously consider using my death body as a demonstration of "jumping suicide".

真面目な話です。

This is a serious matter for me.

2021/06,江端さんの忘備録

「今朝の3時ごろ、部屋で大爆笑していたよね。目が覚めたよ。何見ていたの?』と、嫁さんに尋ねられました。

"You were laughing hysterically in your room around three o'clock this morning. So I woke up. What were you watching?" My wife asked me.

Amazonプライムで、映画「三島由紀夫vs東大全共闘 50年目の真実」を見ていました。

I was watching the movie "Yukio Mishima vs. the University of Tokyo Zenkyoto: 50 Years of Truth" on Amazon Prime.

いやぁ、本当に楽しかった。

Well, it was really fun.

-----

この映画は、昨年4月に公開されていたのですが、新型コロナ感染対策の緊急事態宣言によって、首都圏の映画館は、全部上映中止状態になっていました。

This movie was released in April last year, but due to the declaration of a state of emergency against the new corona infection, all the movie theaters in the Tokyo metropolitan area stopped showing it.

地方の映画館にまで見に行こうか、とも思ったのですが、その時点の日本において「東京都民」が「招かれざる人間」であることは、よく理解していました。

I was wondering if I go to see a movie theater in a rural area, but I understood that "Tokyo residents" were "uninvited guests" in Japan at that time.

今回、Amazonプライムでの視聴が可能となっており、直ぐに飛びつきました。

This time, it was available on Amazon Prime, and I jumped right on it.

----

いや、久々にエキサイティングなドキュメント映画でした。

Well, it was one of the most exciting documentary films I've seen in a long time.

三島由紀夫という人物は、非常に魅力的な人物で、ユーモアとウイットに富む語り方に、非常に好感を持ちました。

I found Yukio Mishima to be a very fascinating person, and I liked his humor and witty way of telling stories very much.

東大全共闘の代表者の方の、ロジカルで冷静な対応も、また印象的でした(まあ、そうでない人物も登場しましたが)。

I was also impressed by the logical and calm response of the representative of the Zenkyouto of University of Tokyo (well, there was also someone who didn't).

また、議論の映像の最中の中で差し込まれる、当時の関係者や有識者のコメントは、議論の内容を理解する上で大変助けになりました。

Also, the comments from the people and experts involved at the time, inserted in the middle of the video of the discussion, were a great help in understanding the content of the discussion.

----

で、所感なのですが ――

So, my impression was,

私、三島由紀夫氏の主張している内容は概ね理解できたと思うのですが、東大全共闘の代表者の方の主張は、半分くらいしか理解できませんでした。

I think I understood most of what Yukio Mishima was arguing, but I could only understand about half of what the representative of the University of Tokyo Zenkyoto was saying.

使っている用語が、「難しい」というより、分かりませんでした。

The terms used were "difficult". Rather, I couldn't understand them.

最大の問題は、東大全共闘の代表者のしゃべっている内容を、オブジェクト化(彼らが言うところの『事物(じぶつ)』に)できなかったからです。

The biggest problem was that we could not objectify (what they call "things") what the representatives of the University of Tokyo Zenkyoto were saying.

-----

私、この両者の主張を、UML(統一モデリング言語)のクラス図を頭の中で作りながら、聞いてました。

I listened to both of their arguments while creating a UML (Unified Modeling Language) class diagram in my mind.

三島由紀夫氏の話は、現実世界のオブジェクトの態様 ―― 有体物があり、有体物(事物)には名前があり、名前は有体物の機能を説明するものであり、有体物には存続時間がある ―― という、オブジェクト指向プログラミングにおける、当たり前の世界の姿をベースとしていました。

Yukio Mishima's talk was based on the natural state of the world -- there are objects, objects (things) have names, names describe the function of objects, objects have a duration -- in object-oriented programming, based on real-world objects.

比して、東大全共闘の代表者の話は、変化する有体物(事物)ものに対して、名前を付与して、その機能を限定的にすることそれ自体が、ネガティブ(反革命?)で、そのようなスタンスが、開放区の新しい意義を見い出すアプローチを阻害するものですらある、と主張しているように思えました。

In contrast, the representative of the University of Tokyo Zenkyoto seemed to argue that it is negative (counter-revolutionary?) to give a name to a changing tangible object (thing) and limit its function. It seemed to me that they were arguing that such a stance is negative (counter-revolutionary?), and that it even hampers the approach to finding a new meaning for open zones.

# たぶん、上記の理解で当っていると思うんだけど、間違っているかなぁ?

# I think I'm probably right in my understanding of the above, but I wonder if I'm wrong?

結論から言うと、東大全共闘の代表者の方の話では、

As it turns out, according to a representative of the University of Tokyo Zenkyoto, I thought,

―― 私(江端)は、東大キャンパスの開放区を、オブジェクトモデルでプログラミングすることはできそうにないな

"I (Ebata) don't think I can program the open area of the University of Tokyo campus with an object model"

と思いました。

つまり、東大全共闘の要求仕様では、(少なくとも私は)「開放区を設計できない」ということです。

This means that (at least for me) "I cannot design an open zone" according to the specifications required by the University of Tokyo Zenkyoto.

逆に、三島由紀夫氏の世界観は、オブジェクトモデルで十分プログラミングできそう、と思いました。

On the other hand, I thought that Yukio Mishima's world view could be programmed using the object model.

もしかしたら、当時の全共闘の方から、『革命的世界観を、工学的手法からアプローチすること自体が反革命だ!』と、自己批判を要求されるかもしれませんが。

Perhaps the Zenkyoto people at the time might ask me to criticize myself, saying, "Approaching a revolutionary worldview from an engineering perspective is itself a counterrevolution!"

------

という訳で、

And so, if you are a publisher who would like to write a book whose title is

『三島由紀夫 vs 東大全共闘 with オブジェクト指向プログラミング』

"Yukio Mishima vs Todai Zenkyoto with Object-Oriented Programming"

という本の執筆を希望される出版社の方がいたら、お声がけ下さい。

Please contact me.

まあ、絶対に「ない」と思いますけど。

Well, I think it's definitely "no".

2021/06,江端さんの忘備録

何年か前に、

A few years ago,

「逃げるは恥だが役に立つ」

"Running away is a shame, but useful"

というコメディドラマが大ヒットしました。

the comedy-drama of the title was a big hit.

-----

現在、私は、各種の発明を考えて、ブレストを何回か繰り返しているのですが、正直もうネタ切れで、フラフラです。

I'm currently brainstorming several times on various inventions, but to be honest, I'm out of ideas and dizzy.

「批判は要だが腹が立つ」

"Criticism is necessary, but it makes me angry"

という、IT系研究員を主人公にしたドラマ、誰か作ってくれないかな、と思っています。

I'm wondering if anyone would like to make a drama about IT researchers.

2021/03,江端さんの技術メモ

http://mstc.or.jp/faop/committee/11b4d681d4059ef7fed08409b8b34e1f2c1c4029.PDF

nxdlink_lua

--[[ Wireshark用 NX/Dlinkプロトコル解析プログラム 
 	       			      	ver0.03	  2012年2月16日
 	       			      	ver0.02	  2012年2月10日
 	       			      	ver0.01	  2012年2月1日

						  江端智一
使用条件 
 	    絶対的な意味において無保証
 
History
   Ver 0.03	重複登録を一応回避

   Ver 0.02	TCP/UDPデータに"NUXM"があったら、送信ポート番号を調べて
       		動的にDissectorをWiresharkに登録するようにした

   Ver 0.01	とりあえず動作確認のみ
		udpポート番号が特定の値に固定されている
		フィールドの位置がズレている可能性あり

使い方
 (Step.1)	c:/Program Files/Wireshark/init.lua の一部を書き換え
   		
	(a)	disable_lua = true; do return end; 
 			     ↓ 
		-- disable_lua = true; do return end; 

	(b)	run_user_scripts_when_superuser = false
  			     ↓ 
		run_user_scripts_when_superuser = true

	(c)	最終行に 以下の一行を追加
		"init.lua"と同じディレクトリに置く
		dofile("nxdlink.lua")

 (Step.2)	このファイルを c:/Program Files/Wireshark/ に
 		"nxdlink.lua"という名前で保存
]]

do
    nxdlink_proto = Proto("NXDlink", "nxdlink protocol dissector")


    nxdlink_proto.dissector = function(buffer, pinfo, tree)

       -- nexus header type : "NUXM"
       local    hd_h_type_range = buffer(0,4)
       local    hd_h_type = hd_h_type_range:string()

       -- message length ( 16K + 64 )
       local 	hd_ml_range = buffer(4,4)
       local    hd_ml = hd_ml_range:uint()

       -- source protocol address
       local	hd_sa_range = buffer(8,4)
       local	hd_sa = hd_sa_range:uint()

       -- destination address	
       local 	hd_da_range = buffer(12,4)
       local 	hd_da = hd_da_range:uint()

       -- boot time stamp
       local 	hd_v_seq_range = buffer(16,4)
       local 	hd_v_seq = hd_v_seq_range:uint()

       -- message number
       local    hd_seq_range = buffer(20,4)
       local    hd_seq = hd_seq_range:uint()
		
       --[[ /* message control type		*/
         			/* UDP_MSG : multicast send	*/
				/* UDP_INQ : multicast inquire	*/
				/* UDP_NIQ : multicast Ninquire	*/
				/* TCP_MSG : peer send		*/
				/* TCP_INQ : peer inquire	*/
				/* TCP_RPL : peer reply		*/]]

       local	hd_m_ctl_range = buffer(24,4)
       local	hd_m_ctl = hd_m_ctl_range:uint()

       local    control_type  = { 
            [0x80000000] = "UDP_MSG(0x80000000) : multicast send", 
            [0xa0000000] = "UDP_INQ(0xa0000000) : multicast inquire",
	    [0x88000000] = "UDP_NIQ(0x88000000) : multicast Ninquire",
	    [0x40000000] = "TCP_MSG(0x40000000) : peer send",
	    [0x60000000] = "TCP_INQ(0x60000000) : peer inquire",
	    [0x50000000] = "TCP_RPL(0x50000000) : peer reply",
       }

       -- /* inquire ID parameter		*/
       
	-- /* inquire source address	 */
       local	inq_id_range = buffer(28,12)

	-- /* transaction code		*/
       local 	hd_tcd_range = buffer(40,2)
       local 	hd_tcd = hd_tcd_range:uint()

       -- /* program version number	*/
       local    hd_ver_range = buffer(42,2)
       local    hd_ver = hd_ver_range:uint()

       -- /* future use			*/
       local 	hd_fu0_range = buffer(44,3)
       local 	hd_fu0 = hd_fu0_range:uint()

       -- /* acknowledge request mode	*/
		--		/* PT_REQ : request message	*/
		--		/* PT_ACK : response message	*/
       local    hd_pkind_range = buffer(47,1)
       local    hd_pkind = hd_pkind_range:uint()

       -- /* packet seqence number	*/
       local    hd_pseq_range = buffer(48,4)
       local    hd_pseq = hd_pseq_range:uint()

       -- /* message mode			*/
		--		/* HEAD_ONLINE : online mode	*/
		--		/* HEAD_TEST   : test   mode	*/
       local 	hd_mode_range = buffer(52,2)
       local 	hd_mode = hd_mode_range:uint()

       -- /* protocol version number	*/
	-- /* NEXUS_DLINK : NeXUS/Dlink	*/
	-- /* NEXUS_T     : NeXUS/T	*/
       local    hd_pver_range = buffer(54,1)
       local    hd_pver = hd_pver_range:uint()

       -- /* message service level	*/
       local    hd_pri_range = buffer(55,1)
       local    hd_pri = hd_pri_range:uint()

       -- /* current block number		*/
       local    hd_cbn_range = buffer(56,1)
       local    hd_cbn = hd_cbn_range:uint()

       -- /* total block number		*/
       local    hd_tbn_range = buffer(57,1)
       local    hd_tbn = hd_tbn_range:uint()

       -- /* segmenting block size	*/
       local    hd_bsize_range = buffer(58,2)
       local    hd_bsize = hd_bsize_range:uint()

       -- /* future use			*/
       local 	hd_fu1_range = buffer(60,4)
       local    hd_fu1 = hd_fu1_range:uint()

       -- data
       local	data_range = buffer(64)
       local	data = data_range:string()
        
       local subtree = tree:add("NX Dlink Protocol")


       -- nexus header type : "NUXM"
       subtree:add(hd_h_type_range, "Type:",hd_h_type)

       -- message length ( 16K + 64 )
       subtree:add(hd_ml_range, "Length:",hd_ml)

       -- source protocol address
       dispatch_addr("source protocol address:",hd_sa_range, pinfo, subtree)

       -- /* destination address		*/
       dispatch_addr("destination address:",hd_da_range, pinfo, subtree)

       -- /* boot time stamp		*/
       subtree:add(hd_v_seq_range, "boot time stamp:",hd_v_seq)

       -- /* message number		*/
       subtree:add(hd_seq_range,"message number:",hd_seq)

       -- /* message control type		*/

       dispatch_cnttype(string.format("message control type: %s",control_type[hd_m_ctl]), hd_m_ctl_range, pinfo, subtree)

	-- /* inquire ID parameter */
       dispatch_inq("inquire ID parameter:",inq_id_range, pinfo, subtree)

	-- /* transaction code		*/
       subtree:add(hd_tcd_range, "transaction code:",hd_tcd)

       -- /* program version number	*/
       subtree:add(hd_ver_range, "program version number:",hd_ver)

       -- /* future use			*/
       subtree:add(hd_fu0_range, "future use:",hd_fu0)

       -- /* acknowledge request mode	*/
       subtree:add(hd_pkind_range, "acknowledge request mode:",hd_pkind)

       -- /* packet seqence number	*/
       subtree:add(hd_pseq_range, "packet seqence number:",hd_pseq)

       -- /* message mode			*/
       subtree:add(hd_mode_range, "message mode(1:online 0:test) :",hd_mode)

       -- /* protocol version number	*/
       subtree:add(hd_pver_range, "NX protocol version number:",hd_pver)

       -- /* message service level	*/
       subtree:add(hd_pri_range, "message service level:",hd_pri)

       -- /* current block number		*/
       subtree:add(hd_cbn_range, "current block number:",hd_cbn)

       -- /* total block number		*/
       subtree:add(hd_tbn_range, "total block number:",hd_tbn)

       -- /* segmenting block size	*/
       subtree:add(hd_bsize_range, "segmenting block size:",hd_bsize)

       -- /* future use			*/
       subtree:add(hd_fu1_range, "future use:",hd_fu1)

       -- data
       subtree:add(data_range, "data:",data)
--       dispatch_inq("Data:",data_range, pinfo, subtree)	 

        pinfo.cols.protocol = "NX/Dlink"
        pinfo.cols.info = control_type[hd_m_ctl]
    end

   -- リスナーを定義
   function init_listener()

       u = {} 
       t = {} 

       u_cnt = 1;
       t_cnt = 1;

       u_bool = true
       t_bool = true

       -- UDP/TCPデータの中に"NUXM"があったらフックする	    
       tap = Listener.new("frame", "udp contains NUXM or tcp contains NUXM")   


        function tap.reset()
            print("passed tap.reset")
            u_cnt = 0;
            t_cnt = 0;
        end

       -- Dissector を Wireshark に追加登録
       -- 重複登録問題を(不細工だけけど)以下で対応
       function tap.packet(pinfo,tvb,ip)
       	   -- UDPの場合	
           if ( pinfo.ipproto == 17 ) then

 	       u_flag = 1
 
	       for i=0, u_cnt do 
	           if u[i] == pinfo.dst_port then 
	               u_flag = 0 
  	           end
	       end
	   
	       if u_flag == 1 then 
  	           u_cnt = u_cnt + 1
	           u[u_cnt] = pinfo.dst_port
	           udp_table = DissectorTable.get("udp.port")
	           udp_table:add(pinfo.dst_port, nxdlink_proto)
               end

	   -- TCPの場合  (まだ実験前)
	   elseif ( pinfo.ipproto == 6 ) then

 	       t_flag = 1

	       for i=0, t_cnt do 
	           if u[i] == pinfo.dst_port then 
	               c_flag = 0 
  	           end
	       end

	       if t_flag == 1 then 
  	           t_cnt = t_cnt + 1
	           t[t_cnt] = pinfo.dst_port
  	           tcp_table = DissectorTable.get("tcp.port")
	           tcp_table:add(pinfo.dst_port, nxdlink_proto)
               end
           end
       end
   end

   init_listener()

end

function dispatch_cnttype(string, buffer, pinfo, subtree)
   local subsubtree = subtree:add(buffer(0), string, buffer(0):tvb())	

    subsubtree:add(buffer(0,1),string.format("%d... .... .... .... .... .... .... .... = multicast flag",buffer(0,1):bitfield(0)))
    subsubtree:add(buffer(0,1),string.format(".%d.. .... .... .... .... .... .... .... = unicast flag",buffer(0,1):bitfield(1)))
    subsubtree:add(buffer(0,1),string.format("..%d. .... .... .... .... .... .... .... = inquire flag",buffer(0,1):bitfield(2)))
    subsubtree:add(buffer(0,1),string.format("...%d .... .... .... .... .... .... .... = reply flag",buffer(0,1):bitfield(3)))
    subsubtree:add(buffer(3,1),string.format(".... .... .... .... .... .... .... .%d.. = ack flag(future use)",buffer(3,1):bitfield(5)))
    subsubtree:add(buffer(3,1),string.format(".... .... .... .... .... .... .... ...%d = ack flag(future use)",buffer(3,1):bitfield(7)))

end


function dispatch_udp_port(string, buffer, pinfo, subtree)
    local subsubtree = subtree:add(buffer(0), string, buffer(0):tvb())	

    subsubtree:add(buffer(0,2),"source port:", buffer(0,2):uint())
    subsubtree:add(buffer(2,2),"destination port:", buffer(2,2):uint())
end

function dispatch_addr(string, buffer, pinfo, subtree)
    local subsubtree = subtree:add(buffer(0), string, buffer(0):tvb())	

    subsubtree:add(buffer(0,1),"Domain Number:", buffer(0,1):uint())
    subsubtree:add(buffer(1,1),"Data Field Number:", buffer(1,1):uint())
    subsubtree:add(buffer(2,2),"Node Number/Multicast Group Number:", buffer(2,2):uint())
end

function dispatch_inq(string, buffer, pinfo, subtree)
    local subsubtree = subtree:add(buffer(0), string, buffer(0):tvb())	
    
    subsubtree:add(buffer(0,2), "inquire source address:",buffer(0,2):uint())
    subsubtree:add(buffer(2,2), "inquire control block address:",buffer(2,2):uint())
    subsubtree:add(buffer(4,2), "inquire ID sequence number:",buffer(4,2):uint())
end