Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
階層独立性の高いプロトコルスタックの設計と実装
Search
Hiroki Watanabe (nelio)
March 22, 2019
Programming
0
1.2k
階層独立性の高いプロトコルスタックの設計と実装
2019年3月22日に行われた「第8期サイボウズ・ラボユース成果発表会」にて使用したスライド(一部変更あり)
Hiroki Watanabe (nelio)
March 22, 2019
Tweet
Share
More Decks by Hiroki Watanabe (nelio)
See All by Hiroki Watanabe (nelio)
L4周辺の高機能通信路とネットワークの階層構造の再考
negli0
1
810
Other Decks in Programming
See All in Programming
リアクティブシステムの変遷から理解するalien-signals / Learning alien-signals from the evolution of reactive systems
yamanoku
2
980
研究開発と実装OSSと プロダクトの好循環 / A virtuous cycle of research and development implementation OSS and products
linyows
1
190
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
460
今から始めるCursor / Windsurf / Cline
kengo_hayano
0
110
Going Structural with Named Tuples
bishabosha
0
170
自分のために作ったアプリが、グローバルに使われるまで / Indie App Development Lunch LT
pixyzehn
1
120
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
820
Devin入門と最近のアップデートから見るDevinの進化 / Introduction to Devin and the Evolution of Devin as Seen in Recent Update
rkaga
7
3.7k
2025/3/18 サービスの成長で生じる幅広いパフォーマンスの問題を、 AIで手軽に解決する
shirahama_x
0
160
OUPC2024 Day 1 解説
kowerkoint
0
400
令和トラベルにおけるコンテンツ生成AIアプリケーション開発の実践
ippo012
1
260
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
140
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Code Reviewing Like a Champion
maltzj
522
39k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
4 Signs Your Business is Dying
shpigford
183
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
118
51k
The Invisible Side of Design
smashingmag
299
50k
Testing 201, or: Great Expectations
jmmastey
42
7.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
What's in a price? How to price your products and services
michaelherold
245
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
470
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Transcript
֊ಠཱੑͷߴ͍ ϓϩτίϧελοΫͷ ઃܭͱ࣮ ୈظαΠϘζɾϥϘϢʔεՌൃදձ!$ZCP[V౦ژΦϑΟε .BS )JSPLJ8"5"/"#& ެ։൛
• OFMJP - 5XJUUFS!@@OFMJP@@ - )1https://negli0.github.io - ݱࡏܚጯٛक़େֶ% - ϝϯλʔޫ͞Μ
• ݚڀ/FUXPSL4ZTUFN - &EHF$PNQVUJOH 4FSWJDF$IBJOJOH - "EWBODFE3PVUJOHɼ1SPUPDPM4UBDL झຯ 2 )JSPLJ8BUBOBCF
• ͘Β͍ເͯͨ͠ϞϊΛ࡞Δ - ֊ಠཱੑͷߴ͍ϓϩτίϧελοΫlFYMBZz • ΧʔωϧϓϩάϥϛϯάΛ͍ͨ͠ - ΄ͱΜͲͬͨ͜ͱ͕ͳ͔ͬͨͷͰ • ϥϘϢʔεલΧʔωϧ͔ͬ৮ͬͯͨ
• ޙϢʔβۭؒʢ1P$ʣ࣮ - ͋ͱݚڀͷࢹΛ͛ΔͨΊ • ࣮υϦϒϯͳݚڀͱͯ͠Ґஔ͚ͮΔ - ීஈݚڀυϦϒϯͳ࣮ • ࣮υϦϒϯͰ͖Δͱָͦ͠͏ Ͱ͖ͨ΄͏͕ྑ͍ 3 ϥϘϢʔεʹ͓͚Δୡඪ
• ݱࡏͷϓϩτίϧελοΫ ҎԼ୯ʹελοΫ - ϓϩτίϧͷػೳͱ֊͕ີ݁߹ ϞϊϦγοΫ • FH
&UIFSOFUୈ֊ɼ*1ୈ֊ɼʜ - طʹఆٛ͞Εͨ֊ߏΛར༻͢ΔϞσϧ • ֤ϓϩτίϧͷػೳͱ֊ҐஔΛ - ֊ಠཱੑ͕ߴ͘ͳΔ • ϓϩτίϧػೳͱ֊Ґஔͷ͕ؔرബʹ - ϓϩτίϧͷ֓೦Λ͋Δఔ·ͰҰൠԽͰ͖Δ • ػೳ͕ҟͳΔ͚ͩͰஔ͖͑Մೳ 4 ͡Ίʹ
5 Πϝʔδ Prot. W Prot. X Prot. Z App. App.
App. Prot. Y Prot. X Prot. W Prot. Y Prot. Z App. App. App. Prot. Y Prot. Z Prot. X Prot. W Prot. Y Prot. W Prot. Z Prot. W Prot. X ϞϊϦγοΫͳελοΫ ֊ಠཱੑ͕ߴ͍ελοΫ ֤ϓϩτίϧΛͲ͜ʹҐஔ͚ͮΔ͔ "QQ͝ͱʹҧͬͯྑ͍
• ϓϩτίϧ֓೦ͷҰൠԽ - ஔ͖͑Մೳɼػೳ͕֊ҐஔʹറΒΕͳ͍ • FH *1͚ͩΛผͷ-ϓϩτίϧʹஔ͖͑ • FH ಠࣗͷελοΫΛఆٛՄೳ
- ੍ϓϩτίϧಠࣗͷૢ࡞͕͘͠ͳΔ • ϓϩτίϧ࣮ͷ࠶ར༻ - ϓϩτίϧ͕ΞϓϦʹ౷߹͞Εͳ͍ˠ͍ճ͠ • ٯʹݴ͑ΞϓϦ͝ͱʹ࠷దԽͰ͖ͳ͍ - ৽ͨͳಠࣗϓϩτίϧͷ࣮ݧ͕༰қ • Ұ࡞Ε্ҐԼҐΛվΊͯ࡞Βͳͯ͘ྑ͍ 6 ֊ಠཱੑΛߴΊΔՁ
• ϓϩτίϧૢ࡞ͷநԽ - ͲΜͳॱংͰੵΈ্͛ΒΕͯػೳ͢ΔΑ͏ʹ • 1SPUPDPM1SPUPDPM*'ͷ͋ΔఔͷҰൠԽ • ελοΫͱΞϓϦΛ͢Δ - ϓϩτίϧ࣮ଞͷελοΫͰ͍ճͤΔ
• $1MBOFαϙʔτ - ֤ϓϩτίϧʹ͓͚Δ௨৴૬खΛಈతʹܾఆՄ • "31ɼ/%1ͳͲ 7 ཁٻࣄ߲
• 04*ࢀরϞσϧΛ࣮͠Α͏ͱͨ͠ - ֤ͷ*'ڞ௨ • ͋ΒΏΔ-ϓϩτίϧ ڞ௨*'Ͱ-ϓϩτίϧͱ ΓऔΓՄೳ - ֤ؒͷ*'ผ
• --*'ͱ--*'ผ 8 ؔ࿈ٕज़4ZTUFN7453&".4 • Transport Provider Interface Specification ◦ http://www.openss7.org/docs/tpi.pdf • Network Provider Interface Specification ◦ http://www.openss7.org/docs/npi.pdf • Datalink Provider Interface Specification ◦ http://www.openss7.org/docs/dlpi.pdf Layer 1 Layer 2 Layer 3 Layer 4 Layer 7 ... L1-L2 I/F L2-L3 I/F L3-L4 I/F ϓϩτίϧ͕֊Ґஔʹଋറ͞Ε͍ͯΔͱ͍͑Δ
• ͷநԽߏ छͷ*' - ߴͰ༏ΕͨநԽ - 1SPUPDPM1SPUPDPM*'ෆఆ • 'SFF#4%protosw
Ͱ நԽ • -JOVYʜʁ • Ұൠʹ֊ߏ੩తఆٛ - વܾΊଧͪ͢Δ΄͏͕ߴ 9 ؔ࿈ٕज़#4%4PDLFU Driver Socket App Protocol-Driver I/F Protocol Stack App.-Socket I/F Socket-Protocol I/F Protocol
• 1SPUPDPM1SPUPDPM*'ͷநԽ - "QQY,FSOFMɼ Y,FSOFM%SJDFSநԽ - 453&".4ͱ#4%4PDLFU ͷ͍͍ͱ͜औΓΛࢦͨ͠ • ֊ߏ੩తఆٛ
- ఆٛΛมߋ͢Δʹ ΧʔωϧίϯύΠϧ͕ඞཁ - ଟ༷ͳελοΫΛදݱՄೳ 10 ؔ࿈ٕज़x,FSOFM Driver App x-Kernel-Driver I/F App.-x-Kernel I/F Protocol-Protocol I/F x-Kernel /$)VUDIJOTPOBOE--1FUFSTPO 5IFY,FSOFMBOBSDIJUFDUVSFGPSJNQMFNFOUJOHOFUXPSLQSPUPDPMT JO*&&& 5SBOTBDUJPOTPO4PGUXBSF&OHJOFFSJOH WPM OP QQ +BOจ63-
• Y,FSOFMΛࠓ෩ʹϦΞϨϯδ - $-*ͰϓϩτίϧΛFYMBZTUBDLʹϩʔυ - ϩʔυ͞ΕͨϓϩτίϧΛ༻͍ͯ"QQ͕ ελοΫΛఆٛ • ϓϩτίϧ࣮ -
TIBSFEMJCSBSZ • 1P$ͬͪ͜ - LFSOFMNPEVMF • ࠓޙ࣮ݱ͍ͨ͠ 11 FYMBZ Driver App exlay-Driver I/F App.-exlay I/F Protocol-Protocol I/F exlay stack Protocol List CLI
• ϓϩτίϧ։ൃͷͨΊͷܗ - OBNFϓϩτίϧ໊ - IES@TJ[FϔομαΠζ - VQQFS@TJ[F্Ґ*%αΠζ • JQQSPUPDPM
• FUIFSOFUUZQF - E@JOQVUE@PVUQVU • ड৴ૹ৴ϋϯυϥ - D@QVMMD@QVTI • $1MBOFϋϯυϥ 12 நԽϓϩτίϧQSPUPDPMPCK name d_input d_output c_pull c_push hdr_size bind_size upper_size dial listen close - EJBMMJTUFODMPTF • ελοΫཱ֬ղ์ϋϯυϥ ͕͜͜؊ɼ͔ͭ·ͩෆेͳͷͰߟ͑ଓ͚Δ
root ethernet ipv4 arp uplyr mac1 upper1 mac1 upper2 fbind
fbind uplyr fp is_top ip1 upper3 ip1 upper4 fbind is_top fbind udp uplyr fbind port1 upper5 is_top • FYMBZͷΤϯυϙΠϯτΛಛఆ͢Δ 13 CJOEJOHUSFF GCJOE QUSUPGPSXBSECJOEJOH ݱ֊ͷ֘ϓϩτίϧͷ MPDBMCJOEJOHͷϦετΛࢦ͢ GQ QUSUPGPSXBSEQSPUP ݱ֊ͷϓϩτίϧͷ ϦετΛࢦ͢ VQMZS QUSUPVQQFSMBZFS ݱ֊ʹ͓͍ͯಛఆ͞Εͨ MPDBMCJOEJOHͷ্Ґ ϓϩτίϧͷϦετΛࢦ͢
14 FYMBZ"1*ͱ࣮ঢ়گ ໊ؔ ಈ࡞ ࣮ঢ়گ FY@DSFBUF@TUBDL ελοΫΛએݴॳظԽ ✔ FY@TFU@CJOEJOH MPDBMͷ*1BEES
QPSUͳͲͷઃఆ ✔ FY@TFU@SFNPUF SFNPUFͷ*1BEES QPSUͳͲͷઃఆ ✔ FY@CJOE@TUBDL ελοΫΛఆٛ ✔ FY@EJBM@TUBDL $0SJFOUFEͳϓϩτίϧͷଓཁٻ FY@MJTUFO@TUBDL $0SJFOUFEͳϓϩτίϧͷଓԠ FY@TFOE@TUBDL ఆٛͨ͠ελοΫʹσʔλΛૹ৴ ✔ FY@SFDW@TUBDL ఆٛͨ͠ελοΫ͔ΒσʔλΛड৴ ✔ FY@DMPTF@TUBDL ఆٛͨ͠ελοΫΛղ์
• MJTUՃࡁΈϓϩτίϧऔಘ • BEE༻ՄೳϓϩτίϧͷՃ • EFMϓϩτίϧͷআ 15 $-*͔Βͷૢ࡞ Ұ෦ൈਮ
16 "QQ࣮Πϝʔδ
• UFTU@FUIFSOFUϓϩτίϧΛՃ • ֊ UFTU@FUIFSOFU ελοΫΛఆٛ - ѼઌΤϯυϙΠϯτෆ໌ͷ߹υϩοϓ - ѼઌΤϯυϙΠϯτ͕߹க͢Δͱදࣔ
• σʔλͷૹ৴ड৴ - ϝοηʔδͷදࣔ - XJSFTIBSLͰຊʹͦͷσʔλ͔Ͳ͏͔֬ೝ 17 σϞ
• τϯωϧΤϯυϙΠϯτΛ࡞Δ - ݱঢ়VOEFSMBZ͔Βࢦఆ͠ͳ͍ͱ͍͚ͳ͍ • τϯωϦϯάͰͳ͍ʜ • ֤ϓϩτίϧͷॆ࣮ͱ$1MBOFରԠ - Έ߹ΘͤΔϓϩτίϧ͕ແ͍ͱແҙຯ
• Χʔωϧಈ࡞ - TIBSFEMJCˠLFSOFMNPEVMF - 'SFF#4%Ͱಈ͔͍ͨ͠ • QSPUPTX NCVGΛྲྀ༻͍ͨ͠ 18 ࠓޙͷల
• ݱࡏͷϓϩτίϧελοΫ - ϓϩτίϧͷػೳͱ֊͕ີ݁߹ • FYMBZϓϩτίϧͷػೳͱ֊ҐஔΛ - ֊ಠཱੑ͕ߴ͘ͳΔ • ύζϧͷΑ͏ʹϢʔβ͕ελοΫΛఆٛͰ͖Δ
- ϓϩτίϧͷ֓೦Λ͋Δఔ·ͰҰൠԽͰ͖Δ • σϞ - ࣗ࡞ϓϩτίϧΛ༻͍ͨಠࣗελοΫΛఆٛ - σʔλૹड৴͕Ͱ͖ͨ 19 ·ͱΊ
• وॏͳܦݧ͕Ͱ͖·ͨ͠ - ͖ͳ044࡞͓͍͚ͬͯۚͨͩͯʜ • ྑ͍ҙݟΛࢁ͍͖ͨͩ·ͨ͠ - ޫ͞Μɼ͞Μɼ͋Γ͕ͱ͏͍͟͝·ͨ͠ • େֶͰ։ൃʹ͍ͭͯฉ͚Δ૬ख͕΄΅͍ͳ͍
• ಠྗେࣄ͕ͩ։ൃ্खͳਓʹֶͿͷେࣄ • ϥϘϢʔεΛΊ·͢ - ੍ΛͬͨΒߦ͖͍ͨਓ݁ߏ͍Δͱࢥ͏ 20 ͓ΘΓʹ