Submit Search
Upload
あなたの知らないネットワークプログラミングの世界
•
2 likes
•
1,824 views
Ryousei Takano
Follow
第二回カーネル・VM探検隊。2009-11-05
Read less
Read more
Technology
Report
Share
Report
Share
1 of 29
Download now
Download to read offline
Recommended
オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)
Ryousei Takano
Python by Martin Geisler
Python by Martin Geisler
Aberla
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
Sam Kim
Make container without_docker_7
Make container without_docker_7
Sam Kim
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
Sam Kim
Practicing Python 3
Practicing Python 3
Mosky Liu
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
Anne Nicolas
GemStone Update
GemStone Update
ESUG
Recommended
オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)
Ryousei Takano
Python by Martin Geisler
Python by Martin Geisler
Aberla
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
Sam Kim
Make container without_docker_7
Make container without_docker_7
Sam Kim
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
Sam Kim
Practicing Python 3
Practicing Python 3
Mosky Liu
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
Anne Nicolas
GemStone Update
GemStone Update
ESUG
xv6のコンテキストスイッチを読む
xv6のコンテキストスイッチを読む
mfumi
x86とコンテキストスイッチ
x86とコンテキストスイッチ
Masami Ichikawa
Bish Bash Bosh & Co
Bish Bash Bosh & Co
Bish Bash Bosh & Co
とある帽子の大蛇料理Ⅱ
とある帽子の大蛇料理Ⅱ
Masami Ichikawa
πολλαπλασιασμοι ενοτητα 11
πολλαπλασιασμοι ενοτητα 11
Γιαννόπουλος Γιάννης
100Gbpsソフトウェアルータの実現可能性に関する論文
100Gbpsソフトウェアルータの実現可能性に関する論文
y_uuki
User-space Network Processing
User-space Network Processing
Ryousei Takano
デバドラを書いてみよう!
デバドラを書いてみよう!
Masami Ichikawa
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
Ryousei Takano
Disruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on Linux
Naoto MATSUMOTO
クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価
Ryousei Takano
DPDKを拡張してみた話し
DPDKを拡張してみた話し
Lagopus SDN/OpenFlow switch
Xeon dとlagopusと、pktgen dpdk
Xeon dとlagopusと、pktgen dpdk
Masaru Oki
Dpdk環境の話
Dpdk環境の話
Masaru Oki
Intel 82599 10GbE Controllerで遊ぼう
Intel 82599 10GbE Controllerで遊ぼう
Takuya ASADA
10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化
Takuya ASADA
Plan 9のお話
Plan 9のお話
Ryousei Takano
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs
Ryousei Takano
What to do when things go wrong
What to do when things go wrong
Dorneles Treméa
Ruby & Machine Vision - Talk at Sheffield Hallam University Feb 2009
Ruby & Machine Vision - Talk at Sheffield Hallam University Feb 2009
Jan Wedekind
Intro To Git
Intro To Git
kyleburton
IL: 失われたプロトコル
IL: 失われたプロトコル
Ryousei Takano
More Related Content
Viewers also liked
xv6のコンテキストスイッチを読む
xv6のコンテキストスイッチを読む
mfumi
x86とコンテキストスイッチ
x86とコンテキストスイッチ
Masami Ichikawa
Bish Bash Bosh & Co
Bish Bash Bosh & Co
Bish Bash Bosh & Co
とある帽子の大蛇料理Ⅱ
とある帽子の大蛇料理Ⅱ
Masami Ichikawa
πολλαπλασιασμοι ενοτητα 11
πολλαπλασιασμοι ενοτητα 11
Γιαννόπουλος Γιάννης
100Gbpsソフトウェアルータの実現可能性に関する論文
100Gbpsソフトウェアルータの実現可能性に関する論文
y_uuki
User-space Network Processing
User-space Network Processing
Ryousei Takano
デバドラを書いてみよう!
デバドラを書いてみよう!
Masami Ichikawa
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
Ryousei Takano
Disruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on Linux
Naoto MATSUMOTO
クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価
Ryousei Takano
DPDKを拡張してみた話し
DPDKを拡張してみた話し
Lagopus SDN/OpenFlow switch
Xeon dとlagopusと、pktgen dpdk
Xeon dとlagopusと、pktgen dpdk
Masaru Oki
Dpdk環境の話
Dpdk環境の話
Masaru Oki
Intel 82599 10GbE Controllerで遊ぼう
Intel 82599 10GbE Controllerで遊ぼう
Takuya ASADA
10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化
Takuya ASADA
Viewers also liked
(16)
xv6のコンテキストスイッチを読む
xv6のコンテキストスイッチを読む
x86とコンテキストスイッチ
x86とコンテキストスイッチ
Bish Bash Bosh & Co
Bish Bash Bosh & Co
とある帽子の大蛇料理Ⅱ
とある帽子の大蛇料理Ⅱ
πολλαπλασιασμοι ενοτητα 11
πολλαπλασιασμοι ενοτητα 11
100Gbpsソフトウェアルータの実現可能性に関する論文
100Gbpsソフトウェアルータの実現可能性に関する論文
User-space Network Processing
User-space Network Processing
デバドラを書いてみよう!
デバドラを書いてみよう!
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
Disruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on Linux
クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価
DPDKを拡張してみた話し
DPDKを拡張してみた話し
Xeon dとlagopusと、pktgen dpdk
Xeon dとlagopusと、pktgen dpdk
Dpdk環境の話
Dpdk環境の話
Intel 82599 10GbE Controllerで遊ぼう
Intel 82599 10GbE Controllerで遊ぼう
10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化
Similar to あなたの知らないネットワークプログラミングの世界
Plan 9のお話
Plan 9のお話
Ryousei Takano
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs
Ryousei Takano
What to do when things go wrong
What to do when things go wrong
Dorneles Treméa
Ruby & Machine Vision - Talk at Sheffield Hallam University Feb 2009
Ruby & Machine Vision - Talk at Sheffield Hallam University Feb 2009
Jan Wedekind
Intro To Git
Intro To Git
kyleburton
IL: 失われたプロトコル
IL: 失われたプロトコル
Ryousei Takano
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
Bruce Elgort
Followup Session in Asia-Pacific Geant4 Workshop and Training Course 2009 hel...
Followup Session in Asia-Pacific Geant4 Workshop and Training Course 2009 hel...
Go Iwai
Unix Ramblings
Unix Ramblings
Bill Miller
Python on FreeBSD
Python on FreeBSD
pycontw
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
Yury Chemerkin
Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
Logicaltrust pl
マッコスXで始めるPlan 9
マッコスXで始めるPlan 9
Ryousei Takano
One hour application - PHP Quebec Conference 2009
One hour application - PHP Quebec Conference 2009
Philippe Gamache
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
Anthony Jose
The reports of Perl's death have been greatly exaggerated
The reports of Perl's death have been greatly exaggerated
Dominique Dumont
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
Dominic Cleal
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics Studies
ESEM 2014
Deployment tales
Deployment tales
Amoniac OÜ
Deployment tales
Deployment tales
Aleksandr Simonov
Similar to あなたの知らないネットワークプログラミングの世界
(20)
Plan 9のお話
Plan 9のお話
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs
What to do when things go wrong
What to do when things go wrong
Ruby & Machine Vision - Talk at Sheffield Hallam University Feb 2009
Ruby & Machine Vision - Talk at Sheffield Hallam University Feb 2009
Intro To Git
Intro To Git
IL: 失われたプロトコル
IL: 失われたプロトコル
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
Followup Session in Asia-Pacific Geant4 Workshop and Training Course 2009 hel...
Followup Session in Asia-Pacific Geant4 Workshop and Training Course 2009 hel...
Unix Ramblings
Unix Ramblings
Python on FreeBSD
Python on FreeBSD
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
マッコスXで始めるPlan 9
マッコスXで始めるPlan 9
One hour application - PHP Quebec Conference 2009
One hour application - PHP Quebec Conference 2009
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
The reports of Perl's death have been greatly exaggerated
The reports of Perl's death have been greatly exaggerated
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics Studies
Deployment tales
Deployment tales
Deployment tales
Deployment tales
More from Ryousei Takano
Error Permissive Computing
Error Permissive Computing
Ryousei Takano
Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCI
Ryousei Takano
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
Ryousei Takano
ABCI Data Center
ABCI Data Center
Ryousei Takano
USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)
Ryousei Takano
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
Ryousei Takano
A Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center Networks
Ryousei Takano
クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術
Ryousei Takano
AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...
Ryousei Takano
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告
Ryousei Takano
Expectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software research
Ryousei Takano
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
Ryousei Takano
不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か
Ryousei Takano
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
Ryousei Takano
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
Ryousei Takano
From Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computers
Ryousei Takano
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
Ryousei Takano
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Ryousei Takano
IEEE/ACM SC2013報告
IEEE/ACM SC2013報告
Ryousei Takano
A Scalable and Distributed Electrical Power Monitoring System Utilizing Cloud...
A Scalable and Distributed Electrical Power Monitoring System Utilizing Cloud...
Ryousei Takano
More from Ryousei Takano
(20)
Error Permissive Computing
Error Permissive Computing
Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCI
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI Data Center
ABCI Data Center
USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
A Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center Networks
クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術
AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告
Expectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software research
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
From Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computers
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
IEEE/ACM SC2013報告
IEEE/ACM SC2013報告
A Scalable and Distributed Electrical Power Monitoring System Utilizing Cloud...
A Scalable and Distributed Electrical Power Monitoring System Utilizing Cloud...
Recently uploaded
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Nikki Chapple
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LoriGlavin3
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
Pixlogix Infotech
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
Inflectra
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Kari Kakkonen
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
Ingrid Airi González
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
IES VE
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Mydbops
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Ravi Sanghani
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
Neo4j
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Knoldus Inc.
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
Bernd Ruecker
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Mark Goldstein
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
itnewsafrica
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
ThousandEyes
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
TopCSSGallery
Recently uploaded
(20)
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
あなたの知らないネットワークプログラミングの世界
1.
oraccha
Plan9 http://d.hatena.ne.jp/oraccha/ 2009 11 5 VM Thursday, November 5, 2009
2.
Plan 9
• Plan 9 ... • UNIX V1 • xv6 • V7/x86 • 2.11BSD • X Window System Thursday, November 5, 2009
3.
Plan 9
4th International Workshop on Plan 9 ... Thursday, November 5, 2009
4.
•
Plan 9 • BSD dial(2) • acid truss Thursday, November 5, 2009
5.
Plan 9
• • 9P • Thursday, November 5, 2009
6.
•
• open-read-write-close Thursday, November 5, 2009
7.
...
UNIX UNIX • • UCB • GUI • X MIT Thursday, November 5, 2009
8.
API
• open-read-write-close • BSD • Thursday, November 5, 2009
9.
/net
• • • /net/ether0 • /net/^(arp icmp udp tcp) • /net/^(cs dns) Thursday, November 5, 2009
10.
/net/tcp
• /net/tcp/N • ctl • data • /net/tcp/clone % lc /net/tcp 0 1 10 ... clone stats % lc /net/tcp/0 ctl data err listen local remote status Thursday, November 5, 2009
11.
echo client
terminal 1: % cat /net/tcp/clone open(“/net/tcp/clone”) 5 open(“/net/tcp/*/ctl”) % cat > /net/tcp/clone connect 204.178.31.2!7 terminal 2: % cat /net/tcp/5/data & % echo hoge > /net/tcp/5/data echo Thursday, November 5, 2009
12.
telnet client
clonefile=/net/tcp/clone if(! ~ $#* 2) { echo Usage: telnet ip port >[1=2] exit usage } <[4] $clonefile { netdir=`{basename -d $clonefile} ^ / ^ `{cat /fd/4} echo connect $1!$2 >$netdir/ctl || exit 'cannot connect' cat $netdir/data & cat >$netdir/data } Thursday, November 5, 2009
13.
/net/cs
• • clone IP % ndb/csquery > tcp!www.bell-labs.com!http /net/tcp/clone 135.245.1.14!80 Thursday, November 5, 2009
14.
•
% srv tcp!plan9.bell-labs.com!http foo post... % netstat -n tcp 29 oraccha Established 58069 80 204.178.31.2 % echo GET /plan9/index.html >>/srv/foo % cat /srv/foo <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> : % rm /srv/foo Thursday, November 5, 2009
15.
echo
int fd, n; char *name; name = netmkaddr(“plan9.bell-labs.com”, “tcp”, “echo”); “204.178.31.2!echo fd = dial(name, 0, 0, 0); : n = write(fd, buf, sizeof(buf)); read(1, buf, n); Thursday, November 5, 2009
16.
echo
int acfd, lcfd, dfd, n; char adir[40], ldir[40] /net/tcp/5 acfd = announce("tcp!*!7", adir); for (;;) { /net/tcp/6 lcfd = listen(adir, ldir); switch (fork()) { UNIX case 0: dfd = accept(lcfd, ldir); while ((n = read(dfd, buf, sizeof(buf))) > 0) write(dfd, buf, n); exits(0); } } Thursday, November 5, 2009
17.
BSD
Plan 9 BSD socket dial active open fd socket announce passive open fd dial connect active open - bind announce listen listen/accept accept reject close - shutdown Thursday, November 5, 2009
18.
•
dial(2) • /sys/src/libc/9sys/dial.c • announce(2), listen(2), accept(2), reject(2) • /sys/src/libc/9sys/announce.c • netmkaddr(2) • /sys/src/libc/port/netmkaddr.c • /net/cs • /sys/src/cmd/ndb/cs.c Thursday, November 5, 2009
19.
acid
truss (strace) % acid -l truss a.out a.out:386 plan 9 executable /sys/lib/acid/port /sys/lib/acid/truss /sys/lib/acid/386 acid: new() acid: truss() : Thursday, November 5, 2009
20.
echo
truss / # dial(2) open("/net/cs", 2) # open connection server return value: 3 pwrite(3, "tcp!192.168.0.1!8007", 20, -1) # translate the address return value: 20 seek(0x00013e30, 3, 0, 0) return value: 0 pread(3, 0x7fffec00, 127, -1) return value: 31 data: "/net/tcp/clone 192.168.0.1!8007" Thursday, November 5, 2009
21.
echo
truss / open("/net/tcp/clone", 2) # open clone file return value: 4 pread(4, 0x7fffe7d0, 255, -1) # get directory name return value: 2 data: "33" # connect(2) pwrite(4, "connect 192.168.0.1!8007", 24, -1) # connect return value: 24 open("/net/tcp/33/data", 2) # open data connection return value: 5 close(4) # close clone file return value: 0 close(3) # close connection server return value: 0 Thursday, November 5, 2009
22.
echo
truss / # echo pread(0, 0x00014aa8, 4096, -1) glenda # input “glenda” from stdin return value: 7 data: "glenda " pwrite(5, "glenda ", 8, -1) return value: 8 pread(5, 0x7fffee5c, 256, -1) return value: 8 data: "glenda " pwrite(1, "glenda ", 8, -1) glenda # output “glenda” to stdout return value: 8 Thursday, November 5, 2009
23.
echod
truss / # announce(2) open("/net/cs", 2) # open connection server return value: 3 pwrite(3, "tcp!*!8007", 10, -1) # translate the address return value: 10 seek(0x00007a94, 3, 0, 0) return value: 0 pread(3, 0x7fffe8b4, 255, -1) return value: 19 data: "/net/tcp/clone 8007" close(3) # close connection server return value: 0 Thursday, November 5, 2009
24.
echod
truss / open("/net/tcp/clone", 2) # open clone file return value: 3 pread(3, 0x7fffece9, 246, -1) # get directory name return value: 2 data: "29" pwrite(3, "announce 8007", 13, -1) # announce service return value: 13 # listen(2) open("/net/tcp/29/listen", 2) # open listen file return value: 4 pread(4, 0x7fffece9, 246, -1) # get directory name return value: 2 data: "34" Thursday, November 5, 2009
25.
echod
truss / # accept(2) pwrite(4, "accept 34", 9, -1) # accept a call return value: -1 # (ignore return value) open("/net/tcp/34/data", 2) # open data file return value: 5 # echod pread(5, 0x7fffee04, 256, -1) return value: 8 data: "glenda " pwrite(5, "glenda ", 8, -1) return value: 8 Thursday, November 5, 2009
26.
•
man dial(2) • Pegasus by • http://plan9.aichi-u.ac.jp/pegasus/ Thursday, November 5, 2009
27.
TODO
• • TCP/IP • TCP: 3200 • UDP: 620 • Thursday, November 5, 2009
28.
•
• open-close-read-write • Plan 9 • Thursday, November 5, 2009
29.
Plan9
http://d.hatena.ne.jp/oraccha/ Thursday, November 5, 2009
Download now