ofs | hex dump | ascii |
---|
0000 | ff d8 ff e0 00 10 4a 46 49 46 00 01 02 01 00 48 00 48 00 00 ff ed 0b f8 50 68 6f 74 6f 73 68 6f | ......JFIF.....H.H......Photosho |
0020 | 70 20 33 2e 30 00 38 42 49 4d 03 ed 00 00 00 00 00 10 00 48 00 00 00 01 00 01 00 48 00 00 00 01 | p.3.0.8BIM.........H.......H.... |
0040 | 00 01 38 42 49 4d 03 f3 00 00 00 00 00 08 00 00 00 00 00 00 00 01 38 42 49 4d 04 0a 00 00 00 00 | ..8BIM................8BIM...... |
0060 | 00 01 00 00 38 42 49 4d 27 10 00 00 00 00 00 0a 00 01 00 00 00 00 00 00 00 02 38 42 49 4d 03 f5 | ....8BIM'.................8BIM.. |
0080 | 00 00 00 00 00 48 00 2f 66 66 00 01 00 6c 66 66 00 06 00 00 00 00 00 01 00 2f 66 66 00 01 00 a1 | .....H./ff...lff........./ff.... |
00a0 | 99 9a 00 06 00 00 00 00 00 01 00 32 00 00 00 01 00 5a 00 00 00 06 00 00 00 00 00 01 00 35 00 00 | ...........2.....Z...........5.. |
00c0 | 00 01 00 2d 00 00 00 06 00 00 00 00 00 01 38 42 49 4d 04 00 00 00 00 00 00 02 00 03 38 42 49 4d | ...-..........8BIM..........8BIM |
00e0 | 04 02 00 00 00 00 00 08 00 00 00 00 00 00 00 00 38 42 49 4d 04 14 00 00 00 00 00 04 00 00 00 0b | ................8BIM............ |
0100 | 38 42 49 4d 04 0c 00 00 00 00 0a ed 00 00 00 01 00 00 00 80 00 00 00 50 00 00 01 80 00 00 78 00 | 8BIM...................P......x. |
0120 | 00 00 0a d1 00 18 00 01 ff d8 ff e0 00 10 4a 46 49 46 00 01 02 01 00 48 00 48 00 00 ff fe 00 27 | ..............JFIF.....H.H.....' |
0140 | 46 69 6c 65 20 77 72 69 74 74 65 6e 20 62 79 20 41 64 6f 62 65 20 50 68 6f 74 6f 73 68 6f 70 a8 | File.written.by.Adobe.Photoshop. |
0160 | 20 34 2e 30 00 ff ee 00 0e 41 64 6f 62 65 00 64 80 00 00 00 01 ff db 00 84 00 0c 08 08 08 09 08 | .4.0.....Adobe.d................ |
0180 | 0c 09 09 0c 11 0b 0a 0b 11 15 0f 0c 0c 0f 15 18 13 13 15 13 13 18 11 0c 0c 0c 0c 0c 0c 11 0c 0c | ................................ |
01a0 | 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 01 0d 0b 0b 0d 0e | ................................ |
01c0 | 0d 10 0e 0e 10 14 0e 0e 0e 14 14 0e 0e 0e 0e 14 11 0c 0c 0c 0c 0c 11 11 0c 0c 0c 0c 0c 0c 11 0c | ................................ |
01e0 | 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c ff c0 00 11 08 | ................................ |
0200 | 00 50 00 80 03 01 22 00 02 11 01 03 11 01 ff dd 00 04 00 08 ff c4 01 3f 00 00 01 05 01 01 01 01 | .P...."................?........ |
0220 | 01 01 00 00 00 00 00 00 00 03 00 01 02 04 05 06 07 08 09 0a 0b 01 00 01 05 01 01 01 01 01 01 00 | ................................ |
0240 | 00 00 00 00 00 00 01 00 02 03 04 05 06 07 08 09 0a 0b 10 00 01 04 01 03 02 04 02 05 07 06 08 05 | ................................ |
0260 | 03 0c 33 01 00 02 11 03 04 21 12 31 05 41 51 61 13 22 71 81 32 06 14 91 a1 b1 42 23 24 15 52 c1 | ..3......!.1.AQa."q.2.....B#$.R. |
0280 | 62 33 34 72 82 d1 43 07 25 92 53 f0 e1 f1 63 73 35 16 a2 b2 83 26 44 93 54 64 45 c2 a3 74 36 17 | b34r..C.%.S...cs5....&D.TdE..t6. |
02a0 | d2 55 e2 65 f2 b3 84 c3 d3 75 e3 f3 46 27 94 a4 85 b4 95 c4 d4 e4 f4 a5 b5 c5 d5 e5 f5 56 66 76 | .U.e.....u..F'...............Vfv |
02c0 | 86 96 a6 b6 c6 d6 e6 f6 37 47 57 67 77 87 97 a7 b7 c7 d7 e7 f7 11 00 02 02 01 02 04 04 03 04 05 | ........7GWgw................... |
02e0 | 06 07 07 06 05 35 01 00 02 11 03 21 31 12 04 41 51 61 71 22 13 05 32 81 91 14 a1 b1 42 23 c1 52 | .....5.....!1..AQaq"..2.....B#.R |
0300 | d1 f0 33 24 62 e1 72 82 92 43 53 15 63 73 34 f1 25 06 16 a2 b2 83 07 26 35 c2 d2 44 93 54 a3 17 | ..3$b.r..CS.cs4.%......&5..D.T.. |
0320 | 64 45 55 36 74 65 e2 f2 b3 84 c3 d3 75 e3 f3 46 94 a4 85 b4 95 c4 d4 e4 f4 a5 b5 c5 d5 e5 f5 56 | dEU6te......u..F...............V |
0340 | 66 76 86 96 a6 b6 c6 d6 e6 f6 27 37 47 57 67 77 87 97 a7 b7 c7 ff da 00 0c 03 01 00 02 11 03 11 | fv........'7GWgw................ |
0360 | 00 3f 00 ed 2d fa b9 49 c8 b6 f6 51 63 9c e7 39 ed 3e b0 00 ef fa 7b 9b f9 bf c8 51 1d 2b a7 13 | .?..-..I...Qc..9.>....{....Q.+.. |
0380 | b4 fa a1 fa cb 4d ad 06 5b f4 f4 74 3b db 0b 67 63 75 fd 0d bc 9d 43 c4 1f 31 fa 54 5a 84 10 36 | .....M..[..t;..gcu....C..1.TZ..6 |
03a0 | 3d b0 df ce 74 8f ea fd 37 fb 93 b8 bc 02 ff 00 77 27 ef cb ed 70 e9 e8 f8 17 b4 ba 81 6d 8d 1c | =...t...7.......w'...p.......m.. |
03c0 | 96 da c4 4f f9 bf 8f fe 8a ff 00 fb 71 8b 75 42 c0 08 1e d2 ef 81 8f e2 d4 b8 8f 60 af 72 7f bc | ...O........q.uB...........`.r.. |
03e0 | 7e d7 17 fe 6f e3 ff 00 a2 bf fe dc 62 5f f3 7f 1f fd 15 ff 00 f6 e3 16 be d1 fe 8d ff 00 78 ff | ~...o.......b_................x. |
0400 | 00 c9 a5 b4 7f a3 7f de 3f f2 69 71 1e c1 5e e4 ff 00 78 fd ae 47 fc df c7 ff 00 45 7f fd b8 c4 | ........?.iq..^...x..G.....E.... |
0420 | bf e6 fe 3f fa 2b ff 00 ed c6 2d 7d a3 fd 1b fe f1 ff 00 93 4b 68 ff 00 46 ff 00 bc 7f e4 d2 e2 | ...?.+....-}........Kh..F....... |
0440 | 3d 82 bd c9 fe f1 fb 5c 8f f9 bf 8f fe 8a ff 00 fb 71 89 7f cd fc 7f f4 57 ff 00 db 8c 5a fb 47 | =......\.........q......W....Z.G |
0460 | fa 37 fd e3 ff 00 26 96 d1 fe 8d ff 00 78 ff 00 c9 a5 c4 7b 05 7b 93 fd e3 f6 b9 1f f3 7f 1f fd | .7....&......x.....{.{.......... |
0480 | 15 ff 00 f6 e3 10 4f 4a e9 e1 c1 85 97 87 3b 81 bd bd bc fe 8a dd da 3f d1 bf ef 1f f9 35 98 fa | ......OJ......;........?.....5.. |
04a0 | eb 39 55 7b 44 6d 79 22 04 13 a7 d2 fd e4 e8 9b bb f0 fc 55 ee 4f f7 8f da d1 18 5d 28 b4 b8 37 | .9U{Dmy"...........U.O.....](..7 |
04c0 | 26 1a e3 59 33 f9 c0 17 ed 1a 7b bd ad 48 e1 74 91 da ff 00 1f a4 3f b9 5d 7b c3 6d b2 1e 5a 65 | &..Y3.....{..H.t......?.]{.m..Ze |
04e0 | 83 6b 5e d6 c3 76 4f d1 77 d1 62 87 aa ed a7 f4 b6 98 fa 3f a7 ae 4f f2 77 27 57 82 bd d9 fe f1 | .k^..vO.w.b........?..O.w'W..... |
0500 | fb 50 33 a6 74 eb 01 2c 65 ee 03 43 ef 6f f1 4d 6f 42 c0 b5 bb 5d 5e 47 87 f3 a1 ba 3b da fd 59 | .P3.t..,e..C.o.MoB...]^G....;..Y |
0520 | ee fa 0a f5 6f ac 4b 8d ce 7e ee cf 78 70 1e 4d da a7 ea 56 74 de 35 f3 47 84 2b dd c8 36 9c be | ....o.K..~..xp.M...Vt.5.G.+..6.. |
0540 | d7 ff d0 f4 af 64 9d 6f 1a 9e 03 e3 fb 3a 7d 14 5a b6 ee 6c 1b 3e 8f 0f 06 3f b5 b8 7d 34 2f 51 | .....d.o.....:}.Z..l.>...?..}4/Q |
0560 | b2 47 da 1e 20 9d 36 8d 3f 93 fc df e6 a3 52 e0 4e 96 17 fb 41 d4 01 fd ad 1a df a4 92 92 a8 59 | .G....6.?.....R.N...A..........Y |
0580 | 10 27 77 f6 67 fe fa a6 a1 61 00 0f 71 6f c0 4f f0 72 4a 46 1a d0 f7 3b 75 a4 10 06 d3 30 23 f7 | .'w.g....a..qo.O.rJF...;u....0#. |
05a0 | 53 58 c6 bd 85 81 d6 b2 7f 39 b3 23 59 d2 65 4b 70 ff 00 48 ff 00 b8 7f e4 12 dc 3f d2 3f ee 1f | SX.......9.#Y.eKp..H.......?.?.. |
05c0 | f9 04 94 c2 da c5 82 03 ee af 9d 59 20 ea 23 f3 83 94 c0 68 00 7e 90 c0 89 f7 25 b8 7f a4 7f dc | ...........Y..#....h.~....%..... |
05e0 | 3f f2 09 6e 1f e9 1f f7 0f fc 82 4a 57 b7 fe 13 fe 92 5e df f8 4f fa 49 6e 1f e9 1f f7 0f fc 82 | ?..n.......JW.....^..O.In....... |
0600 | 5b 87 fa 47 fd c3 ff 00 20 92 98 d9 58 7f 0f b9 9a 11 ed 9e e2 37 6a 1d ee 67 e6 aa 0e fe 95 50 | [..G........X........7j..g.....P |
0620 | fe 43 ff 00 2b 56 8e e1 fe 91 ff 00 70 ff 00 c8 2c b6 3a c3 9a 43 89 da d2 e0 c6 f0 20 06 6b fc | .C..+V......p...,.:..C........k. |
0640 | af a4 e4 f8 6c 7c e2 a6 1b 5a f7 3e d7 7b 5c eb 76 18 61 70 f6 31 cc 6f d1 ff 00 09 b7 fe b7 e9 | ....l|...Z.>.{\.v.ap.1.o........ |
0660 | fe 8b f9 c4 30 da cb 40 0f 67 3f e8 1f 1f 77 a8 89 53 8b 99 66 a5 bb 6f b1 ba 59 e9 92 00 77 fd | ....0..@.g?...w..S..f..o..Y...w. |
0680 | 0f fb ff 00 e9 93 ee 79 6c 97 38 4f fd da 1f f5 41 c9 e0 e8 a6 54 3d 81 db 05 8e 87 99 63 5a c7 | .......yl.8O....A....T=......cZ. |
06a0 | b3 9d 65 da b9 a8 fb 67 97 38 f9 17 18 d3 54 16 7a ae 73 5d ef 2d 3d fd 7d cd ff 00 31 be d7 6e | ..e....g.8....T.z.s].-=.}...1..n |
06c0 | 94 74 e0 a7 ff d1 f4 b1 77 23 ed 35 08 24 41 02 44 7e 69 fd 27 e6 a2 d4 fd c7 f9 d6 59 ed 06 1b | .t......w#.5.$A.D~i.'.......Y... |
06e0 | f3 f7 fd 27 7b 5c a2 06 47 fc 19 1d a6 66 3c d1 2b f5 27 df b7 81 f4 67 9f fc 8a 4a 66 a1 63 b6 | ...'{\..G....f<.+.'....g...Jf.c. |
0700 | 81 ef 0c fe b7 fb c2 9a 8b b7 7e 6c 7c d2 52 3f 50 7f a6 67 e1 ff 00 92 4c eb 9a d1 b9 d7 d6 00 | ..........~l|.R?P..g....L....... |
0720 | ee 60 0d 74 fd e4 4f d2 f8 b7 f1 4c e6 bd c3 6b b6 38 78 11 23 44 94 c7 d4 ff 00 86 67 fa ff 00 | .`.t..O....L...k.8x.#D......g... |
0740 | 69 2f 50 7f a6 67 e1 ff 00 92 4e d6 dc 1c e3 bc 38 38 82 1a 46 8d d2 3d b1 fe 77 b9 4b f4 be 2d | i/P..g....N.....88..F..=..w.K..- |
0760 | fc 52 53 0f 53 fe 15 9f eb fd a4 cd b9 ae 68 73 6f ad cd 3c 11 04 7f d5 22 7e 97 c5 bf 8a 66 b5 | .RS.S.........hso..<...."~....f. |
0780 | ed 1b 5b b1 a0 76 02 02 4a 60 6e 68 70 69 be b0 e7 70 34 93 1e 1e e5 93 49 9e a1 6e 87 47 b8 49 | ..[..v..J`nhpi...p4.....I..n.G.I |
07a0 | ef ed af e8 ad 92 d7 97 07 1d 84 8e 0c 6a 25 65 ec 63 72 d8 5a 20 bc 39 ce f3 3e d6 ee fc 13 e1 | .............j%e.cr.Z..9..>..... |
07c0 | b1 f3 8a 90 50 0f a7 69 ed f6 ab 0c 9a f7 eb 04 69 f4 7d df f0 9f f5 95 20 0f 06 3c ff 00 55 23 | ....P..i........i.}........<..U# |
07e0 | cb f7 92 a5 a1 ac b6 0e af bd ee 82 f2 c3 ee 0e ff 00 a3 ff 00 07 ff 00 5e 48 6a 48 1b 7c 87 da | ........................^HjH.|.. |
0800 | 9d e5 e5 ed 4f 8e ca 4f 55 8d 86 b2 1d bb 82 7d 32 c6 92 39 74 7e 67 f9 c8 88 0c b6 c6 b0 34 0a | ....O..OU......}2..9t~g.......4. |
0820 | c8 1d cd fb 8e a7 f7 9c c5 61 39 0f ff d2 f4 bf 47 52 7e cd 51 92 4c c8 93 fc a3 fa 3f ce 45 a9 | .........a9.....GR~.Q.L.....?.E. |
0840 | 85 a7 f9 b6 56 36 81 ed 3f f4 3e 8b 7d ad 42 15 b0 b8 fe ae fd 64 ee dc d8 27 fe dd dd ee fe aa | ....V6..?.>.}.B......d...'...... |
0860 | 9d 60 37 56 d2 f6 98 8d 4b 4e 83 e8 fe 7b be 92 4a 4e a0 f6 cc 7b 5a ef eb 7f b9 c9 32 c7 ba 26 | .`7V....KN...{..JN...{Z.....2..& |
0880 | b7 32 66 67 6e 9f 1d ae 72 8d f5 32 da cd 6f 69 7b 5d ce d3 b4 f8 fd 20 e6 39 25 2b d3 3f e8 99 | .2fgn...r..2..oi{].......9%+.?.. |
08a0 | f7 ff 00 e6 09 7a 67 fd 13 3e ff 00 fc c1 2d ad ff 00 44 7e f1 ff 00 92 4d b5 bf e8 8f de 3f f2 | .....zg..>....-...D~....M.....?. |
08c0 | 49 29 7f 4c ff 00 a2 67 df ff 00 98 25 e9 9f f4 4c fb ff 00 f3 05 16 54 c6 31 ac 6d 4e da d1 02 | I).L...g....%...L......T.1.mN... |
08e0 | 5d 26 07 8b 9c fd ce 49 d5 31 c5 a4 d4 e9 61 dc 21 d1 ac 16 eb 0f f7 7d 2f ce 49 4c bd 33 fe 89 | ]&.....I.1....a.!......}/.IL.3.. |
0900 | 9f 7f fe 60 97 a6 7f d1 33 ef ff 00 cc 12 da df f4 47 ef 1f f9 25 1a e9 ae b6 06 36 a7 40 93 ab | ...`....3........G...%.....6.@.. |
0920 | a4 ea 77 1f 73 9e 52 53 2f 4c ff 00 a2 67 df ff 00 98 2c e7 7f 4a ab fa 8f fc ad 5a 3b 5b fe 88 | ..w.s.RS/L...g....,..J.....Z;[.. |
0940 | fd e3 ff 00 24 b3 9d fd 2e a1 a4 ed 70 89 00 eb 1b 7d a4 ef f7 7e 6e d6 a7 c3 63 e6 14 8a bd de | ....$.......p....}...~n...c..... |
0960 | 9b a2 63 d7 77 0c 0f 1c 1f cd fa 5f f5 df fa d2 41 af fa 64 38 8d 49 61 c6 13 a6 9d 9b bf f9 4a | ..c.w......_....A..d8.Ia.......J |
0980 | 35 96 1a dc 7d a7 f4 ee 82 5e 59 af bb f3 80 ff 00 c0 bf eb aa 2d 35 ee 0e fd 1e d2 7e 90 c8 71 | 5...}....^Y..........-5.....~..q |
09a0 | 3a 0f dd d8 1b ff 00 4d 3e 3b 29 33 60 13 be b7 3f 49 04 51 11 12 7f 34 7d 2f e4 a2 8b 41 70 6e | :......M>;)3`...?I.Q...4}/...Apn |
09c0 | d7 82 7b 96 3a 38 9f 73 fe 8b 55 6a dd 53 6c 69 26 b0 01 92 7d 77 3a 27 56 bb 63 9a 37 ab 22 da | ..{.:8.s..Uj.Sli&...}w:'V.c.7.". |
09e0 | 9c 76 b5 ed 24 e8 00 22 53 82 9f ff d3 f5 21 65 6d 68 97 01 a7 72 9b d7 a7 fd 23 7e f0 b9 fc 8b | .v..$.."S.....!emh...r....#~.... |
0a00 | 31 c6 4d ef f4 5a 5c 5e e1 ab 0b 8b 9c c2 ed af 3e fd bb 7e 96 c4 9d 75 2d 04 9a ab 20 01 a8 60 | 1.M..Z\^........>..~...u-......` |
0a20 | e4 7f 39 a6 ed de ef f0 6a 4f 6d 16 f4 1e bd 3f e9 1b f7 85 0b 5f 5d 80 06 de 2b 20 cc 82 35 f2 | ..9.....jOm....?....._]...+...5. |
0a40 | 58 4e b2 b6 f3 5d 44 44 82 d6 02 09 3b 7c 1d fb a9 cd 95 88 9a ab 00 c3 b4 60 27 6f e7 37 47 fd | XN...]DD....;|...........`'o.7G. |
0a60 | 34 bd b2 9b 75 9e f2 c2 0b 6c f5 da 74 73 43 c3 5c 3f 97 3b 9a d5 06 d9 6c b5 a5 ef 01 d0 4d 85 | 4...u....l..tsC.\?.;....l.....M. |
0a80 | f5 c0 ee e6 b9 ad 76 ef e4 3f 62 a9 59 e9 f6 6e 86 31 bb 63 e9 80 d9 9f dd 95 2f 4f 03 c2 af 0e | ......v..?b.Y..n.1.c....../O.... |
0aa0 | 5b fd e9 7b 65 56 1b 3e ad a4 87 4b 9b 1b 77 34 58 c2 d7 6b ef d8 e2 ef 53 e8 a4 2d b4 9d a4 bc | [..{eV.>...K..w4X..k....S..-.... |
0ac0 | 02 44 5b ea 57 23 58 76 f6 6f d8 e6 aa de 9e 07 85 3f 7b 52 d9 82 0c 81 54 8f 36 a5 ed 95 58 74 | .D[.W#Xv.o.......?{R....T.6...Xt |
0ae0 | 1a c2 0b 77 64 6e 1c 10 74 93 fd 92 90 a5 fa b7 ed 2e 27 b7 12 3f d7 f9 4b 37 d0 e9 dc c5 63 42 | ...wdn..t.........'..?..K7....cB |
0b00 | dd 1d d8 f2 df a4 ab db 8d 43 5a 76 9a 1d 5c 9d 8c 0d 2e 73 67 e8 7f 85 f7 6d 8f 72 5e df 8a 2d | .........CZv..\....sg....m.r^..- |
0b20 | de 6b 6b 2d 12 f2 e3 1f 48 38 c1 ff 00 a4 b1 5c cf d2 38 ec dc e6 bc eb e8 b4 91 af 8f a7 b9 07 | .kk-....H8.....\..8............. |
0b40 | 66 3d 96 38 6d 63 77 fb 43 9c d2 20 08 3f a4 7f ac 7d be cd aa c5 78 f8 80 01 71 a1 c1 bf 40 30 | f=.8mcw.C....?...}....x...q...@0 |
0b60 | 96 81 3f 4f e9 58 ef a4 9d 18 d2 ad 6c 40 ff 00 b2 80 03 e3 d6 70 f6 b1 a7 f7 bf c1 9f fa bf fa | ..?O.X......l@.......p.......... |
0b80 | d2 24 dc 19 a8 ba 75 9f d1 57 b8 7f 67 e8 ff 00 51 0e 8a b1 76 16 97 86 06 39 ec 6b 77 80 36 ba | .$....u..W..g...Q...v....9.kw.6. |
0ba0 | 7e 8c fd 2f a4 a6 29 c3 00 c5 bb 64 92 4b 6d da 65 db 67 e8 16 ff 00 a3 4a 23 45 5a 9a 6d 90 48 | ~../..)....d.Km.e.g.....J#EZ.m.H |
0bc0 | b8 0e 60 d2 cf f3 7d aa c3 47 b5 b2 3d d0 24 c0 06 7e 1f 9a 80 6b c5 24 1f 5d d2 34 91 71 1c 12 | ..`...}..G..=.$..~...k.$.].4.q.. |
0be0 | ed 7d df ca 53 ad d4 56 d2 d1 70 74 99 97 d9 b8 ff 00 d2 72 70 55 bf ff d9 00 38 42 49 4d 04 06 | .}..S..V..pt.......rpU....8BIM.. |
0c00 | 00 00 00 00 00 07 00 05 00 01 00 01 01 00 ff fe 00 27 46 69 6c 65 20 77 72 69 74 74 65 6e 20 62 | .................'File.written.b |
0c20 | 79 20 41 64 6f 62 65 20 50 68 6f 74 6f 73 68 6f 70 a8 20 34 2e 30 00 ff ee 00 0e 41 64 6f 62 65 | y.Adobe.Photoshop..4.0.....Adobe |
0c40 | 00 64 40 00 00 00 01 ff db 00 84 00 04 03 03 03 03 03 04 03 03 04 06 04 03 04 06 07 05 04 04 05 | .d@............................. |
0c60 | 07 08 06 06 07 06 06 08 0a 08 09 09 09 09 08 0a 0a 0c 0c 0c 0c 0c 0a 0c 0c 0c 0c 0c 0c 0c 0c 0c | ................................ |
0c80 | 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 01 04 05 05 08 07 08 0f 0a 0a 0f 14 0e 0e 0e 14 14 0e 0e 0e | ................................ |
0ca0 | 0e 14 11 0c 0c 0c 0c 0c 11 11 0c 0c 0c 0c 0c 0c 11 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c | ................................ |
0cc0 | 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c 0c ff c0 00 11 08 02 dd 04 93 03 01 11 00 02 11 01 03 11 01 | ................................ |
0ce0 | ff dd 00 04 00 93 ff c4 00 df 00 01 00 03 01 01 01 01 01 00 00 00 00 00 00 00 00 00 04 05 06 07 | ................................ |
0d00 | 03 08 02 01 01 01 00 03 01 01 01 01 00 00 00 00 00 00 00 00 00 00 01 02 05 03 04 06 07 10 00 01 | ................................ |
0d20 | 03 03 02 03 04 05 05 09 0d 03 09 05 02 0f 03 02 04 05 00 01 06 12 13 11 14 07 33 d5 96 17 22 23 | ..........................3..."# |
0d40 | 15 55 16 21 32 73 d3 94 31 b2 53 63 93 34 64 d4 57 41 51 42 e2 83 a3 b3 24 44 74 26 36 08 52 25 | .U.!2s..1.Sc.4d.WAQB....$Dt&6.R% |
0d60 | 56 d2 43 54 b4 35 75 95 76 b6 61 d1 62 92 37 38 81 91 a1 72 84 b5 18 71 85 46 b1 45 c5 66 27 77 | V.CT.5u.v.a.b.78...r...q.F.E.f'w |
0d80 | 11 01 00 01 02 01 05 0c 07 07 03 04 02 02 02 02 03 00 01 11 02 12 f0 31 51 03 13 21 61 71 81 91 | .......................1Q..!aq.. |
0da0 | a1 32 42 52 04 14 05 41 d1 e1 22 62 92 93 b1 c1 e2 23 43 63 25 f1 33 15 72 82 a2 c2 d2 53 b2 06 | .2BR...A.."b.....#Cc%.3.r....S.. |
0dc0 | f2 16 73 d3 44 54 e4 ff da 00 0c 03 01 00 02 11 03 11 00 3f 00 fa 83 fd 43 c9 64 ec 31 8c 79 b6 | ..s.DT.............?....C.d.1.y. |
0de0 | 23 28 48 99 89 6c 81 9c 62 1d 08 8a 0d b8 3a 0b 8b 59 2b 52 2d 7b e8 d5 64 dd 5c 2d 7f b9 57 b2 | #(H..l..b.....:..Y+R-{..d.\-..W. |
0e00 | b5 88 8f 4b 7b c9 bb b7 77 d7 6b 35 93 af b6 6e b2 cd 5d da ca 5b 37 5b 3e e5 3b 33 6f a2 be 9a | ...K{...w.k5...n..]..[7[>.;3o... |
0e20 | 3e 63 f8 ff 00 3b fd af 8f ff 00 9e 6b bb eb ae 2d fb 7e 5f c2 fb 2f f0 5d cb ff 00 f5 75 bf 57 | >c...;......k...-.~_../.]....u.W |
0e40 | ff 00 fa 11 a6 3a 85 d5 28 a6 0c e4 db f5 0d c4 ab 17 a6 70 d9 05 64 77 a9 d0 56 89 0a d6 95 25 | .....:..(..........p..dw..V....% |
0e60 | d0 01 7f b8 74 5e d7 4d 95 6a ad d7 dd 11 5d c9 e2 8f fc 5d 75 1e 43 e5 da cb ee b2 75 37 d9 75 | ....t^.M.j....]....]u.C.....u7.u |
0e80 | b1 17 7b da cb b3 5f 8a 9d 0d 6d fd 8b 94 be 71 f5 53 fe 2e 94 fb 4a ff 00 f7 d5 36 b7 6f 72 5b | ..{..._...m....q.S....J....6.or[ |
0ea0 | ea 7b 7f fd 5f cb bf f5 cf d4 d6 ff 00 e6 be 82 cc 3a ef 92 37 e6 e2 72 49 15 b5 bb 91 b0 19 dc | .{.._............:..7..rI....... |
0ec0 | 48 89 a0 c8 ec d6 ba 90 01 29 c9 47 62 12 f6 b7 1d 08 d4 af b9 f2 7a 49 ae 96 ce b2 ec d1 1c 96 | H........).Gb.........zI........ |
0ee0 | b3 fb cf 93 79 3f 77 9c 37 db 75 69 37 d2 2e d7 df 4b 2d cf 7d d8 2e bb 0d bf 15 db 8a 57 1d 5b /*
* nsim.c - skeleton vpp engine plug-in
*
* Copyright (c) <current-year> <your-organization>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @brief Network Delay Simulator
*/
/*? %%clicmd:group_label Network Delay Simulator %% ?*/
#include <vnet/vnet.h>
#include <vnet/plugin/plugin.h>
#include <nsim/nsim.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
#include <vpp/app/version.h>
/* define message IDs */
#include <nsim/nsim.api_enum.h>
#include <nsim/nsim.api_types.h>
#define REPLY_MSG_ID_BASE nsm->msg_id_base
#include <vlibapi/api_helper_macros.h>
nsim_main_t nsim_main;
/* Action functions shared between message handlers and debug CLI */
int
nsim_cross_connect_enable_disable (nsim_main_t * nsm, u32 sw_if_index0,
u32 sw_if_index1, int enable_disable)
{
vnet_sw_interface_t *sw;
vnet_hw_interface_t *hw;
int rv = 0;
if (nsm->is_configured == 0)
return VNET_API_ERROR_CANNOT_ENABLE_DISABLE_FEATURE;
/* Utterly wrong? */
if (pool_is_free_index (nsm->vnet_main->interface_main.sw_interfaces,
sw_if_index0))
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
if (pool_is_free_index (nsm->vnet_main->interface_main.sw_interfaces,
sw_if_index1))
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
/* Not a physical port? */
sw = vnet_get_sw_interface (nsm->vnet_main, sw_if_index0);
if (sw->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
sw = vnet_get_sw_interface (nsm->vnet_main, sw_if_index1);
if (sw->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
/* Add graph arcs for the input / wheel scraper node */
hw = vnet_get_hw_interface (nsm->vnet_main, sw_if_index0);
nsm->output_next_index0 =
vlib_node_add_next (nsm->vlib_main,
nsim_input_node.index, hw->output_node_index);
hw = vnet_get_hw_interface (nsm->vnet_main, sw_if_index1);
nsm->output_next_index1 =
vlib_node_add_next (nsm->vlib_main,
nsim_input_node.index, hw->output_node_index);
nsm->sw_if_index0 = sw_if_index0;
nsm->sw_if_index1 = sw_if_index1;
vnet_feature_enable_disable ("device-input", "nsim",
sw_if_index0, enable_disable, 0, 0);
vnet_feature_enable_disable ("device-input", "nsim",
sw_if_index1, enable_disable, 0, 0);
return rv;
}
int
nsim_output_feature_enable_disable (nsim_main_t * nsm, u32 sw_if_index,
int enable_disable)
{
vnet_sw_interface_t *sw;
vnet_hw_interface_t *hw;
int rv = 0;
if (nsm->is_configured == 0)
return VNET_API_ERROR_CANNOT_ENABLE_DISABLE_FEATURE;
/* Utterly wrong? */
if (pool_is_free_index (nsm->vnet_main->interface_main.sw_interfaces,
sw_if_index))
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
/* Not a physical port? */
sw = vnet_get_sw_interface (nsm->vnet_main, sw_if_index);
if (sw->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
/* Add a graph arc for the input / wheel scraper node */
hw = vnet_get_hw_interface (nsm->vnet_main, sw_if_index);
vec_validate_init_empty (nsm->output_next_index_by_sw_if_index, sw_if_index,
~0);
/* Note: use the tx node, this pkt has already visited the output node... */
nsm->output_next_index_by_sw_if_index[sw_if_index] =
vlib_node_add_next (nsm->vlib_main, nsim_input_node.index,
hw->tx_node_index);
vnet_feature_enable_disable ("interface-output", "nsim-output-feature",
sw_if_index, enable_disable, 0, 0);
return rv;
}
static int
nsim_configure (nsim_main_t * nsm, f64 bandwidth, f64 delay, f64 packet_size,
f64 drop_fraction)
{
u64 total_buffer_size_in_bytes, per_worker_buffer_size;
u64 wheel_slots_per_worker;
int i;
int num_workers = vlib_num_workers ();
u32 pagesize = getpagesize ();
vlib_main_t *vm = nsm->vlib_main;
if (bandwidth == 0.0)
return VNET_API_ERROR_INVALID_VALUE;
if (delay == 0.0)
return VNET_API_ERROR_INVALID_VALUE_2;
if (packet_size < 64.0 || packet_size > 9000.0)
return VNET_API_ERROR_INVALID_VALUE_3;
/* Toss the old wheel(s)... */
if (nsm->is_configured)
{
for (i = 0; i < vec_len (nsm->wheel_by_thread); i++)
{
nsim_wheel_t *wp = nsm->wheel_by_thread[i];
munmap (wp, nsm->mmap_size);
nsm->wheel_by_thread[i] = 0;
}
}
nsm->delay = delay;
nsm->drop_fraction = drop_fraction;
/* delay in seconds, bandwidth in bits/sec */
total_buffer_size_in_bytes = ((delay * bandwidth) / 8.0) + 0.5;
/*
* Work out how much buffering each worker needs, assuming decent
* RSS behavior.
*/
if (num_workers)
per_worker_buffer_size = total_buffer_size_in_bytes / num_workers;
else
per_worker_buffer_size = total_buffer_size_in_bytes;
wheel_slots_per_worker = per_worker_buffer_size / packet_size;
wheel_slots_per_worker++;
/* Save these for the show command */
nsm->bandwidth = bandwidth;
nsm->packet_size = packet_size;
vec_validate (nsm->wheel_by_thread, num_workers);
/* Initialize the output scheduler wheels */
i = (!nsm->poll_main_thread && num_workers) ? 1 : 0;
for (; i < num_workers + 1; i++)
{
nsim_wheel_t *wp;
nsm->mmap_size = sizeof (nsim_wheel_t)
+ wheel_slots_per_worker * sizeof (nsim_wheel_entry_t);
nsm->mmap_size += pagesize - 1;
nsm->mmap_size &= ~(pagesize - 1);
wp = clib_mem_vm_alloc (nsm->mmap_size);
ASSERT (wp != 0);
wp->wheel_size = wheel_slots_per_worker;
wp->cursize = 0;
wp->head = 0;
wp->tail = 0;
wp->entries = (void *) (wp + 1);
nsm->wheel_by_thread[i] = wp;
}
vlib_worker_thread_barrier_sync (vm);
/* turn on the ring scrapers */
i = (!nsm->poll_main_thread && num_workers) ? 1 : 0;
for (; i < num_workers + 1; i++)
{
vlib_main_t *this_vm = vlib_mains[i];
vlib_node_set_state (this_vm, nsim_input_node.index,
VLIB_NODE_STATE_POLLING);
}
vlib_worker_thread_barrier_release (vm);
nsm->is_configured = 1;
return 0;
}
/*
* enable or disable the cross-connect
*/
static clib_error_t *
nsim_cross_connect_enable_disable_command_fn (vlib_main_t * vm,
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
nsim_main_t *nsm = &nsim_main;
unformat_input_t _line_input, *line_input = &_line_input;
u32 sw_if_index0 = ~0;
u32 sw_if_index1 = ~0;
int enable_disable = 1;
u32 tmp;
int rv;
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "disable"))
enable_disable = 0;
else if (unformat (line_input, "%U", unformat_vnet_sw_interface,
nsm->vnet_main, &tmp))
{
if (sw_if_index0 == ~0)
sw_if_index0 = tmp;
else
sw_if_index1 = tmp;
}
else
break;
}
unformat_free (line_input);
if (sw_if_index0 == ~0 || sw_if_index1 == ~0)
return clib_error_return (0, "Please specify two interfaces...");
rv = nsim_cross_connect_enable_disable (nsm, sw_if_index0,
sw_if_index1, enable_disable);
switch (rv)
{
case 0:
break;
case VNET_API_ERROR_CANNOT_ENABLE_DISABLE_FEATURE:
return clib_error_return (0, "Not configured, please 'set nsim' first");
case VNET_API_ERROR_INVALID_SW_IF_INDEX:
return clib_error_return
(0, "Invalid interface, only works on physical ports");
break;
case VNET_API_ERROR_UNIMPLEMENTED:
return clib_error_return (0,
"Device driver doesn't support redirection");
break;
default:
return clib_error_return (0, "nsim_enable_disable returned %d", rv);
}
return 0;
}
static clib_error_t *
nsim_config (vlib_main_t * vm, unformat_input_t * input)
{
nsim_main_t *nsm = &nsim_main;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "poll-main-thread"))
{
nsm->poll_main_thread = 1;
}
else
{
return clib_error_return (0, "unknown input '%U'",
format_unformat_error, input);
}
}
return 0;
}
VLIB_CONFIG_FUNCTION (nsim_config, "nsim");
/*?
* Enable or disable network simulation cross-connect on two interfaces
* The network simulator must have already been configured, see
* the "nsim_configure" command.
*
* Place the interfaces into a bridge group, to ensure that
* interfaces are in promiscuous mode.
*
* @cliexpar
* To enable or disable network simulation cross-connect
* @clistart
* nsim cross-connect enable-disable TenGigabitEthernet2/0/0 TenGigabitEthernet2/0
* nsim cross-connect enable-disable TenGigabitEthernet2/0/0 TenGigabitEthernet2/0 disable
* @cliend
* @cliexcmd{nsim enable-disable <intfc> <intfc> [disable]}
?*/
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (nsim_enable_disable_command, static) =
{
.path = "nsim cross-connect enable-disable",
.short_help =
"nsim cross-connect enable-disable <interface-name-1> "
"<interface-name-2> [disable]",
.function = nsim_cross_connect_enable_disable_command_fn,
};
/* *INDENT-ON* */
/* API message handler */
static void vl_api_nsim_cross_connect_enable_disable_t_handler
(vl_api_nsim_cross_connect_enable_disable_t * mp)
{
vl_api_nsim_cross_connect_enable_disable_reply_t *rmp;
nsim_main_t *nsm = &nsim_main;
int rv;
u32 sw_if_index0, sw_if_index1;
sw_if_index0 = clib_net_to_host_u32 (mp->sw_if_index0);
sw_if_index1 = clib_net_to_host_u32 (mp->sw_if_index1);
if (!vnet_sw_if_index_is_api_valid (sw_if_index0))
{
rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
goto bad_sw_if_index;
}
if (!vnet_sw_if_index_is_api_valid (sw_if_index1))
{
rv = VNET_API_ERROR_INVALID_SW_IF_INDEX_2;
goto bad_sw_if_index;
}
rv = nsim_cross_connect_enable_disable (nsm, sw_if_index0, sw_if_index1,
(int) (mp->enable_disable));
BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_NSIM_CROSS_CONNECT_ENABLE_DISABLE_REPLY);
}
/* API message handler */
static void vl_api_nsim_output_feature_enable_disable_t_handler
(vl_api_nsim_output_feature_enable_disable_t * mp)
{
vl_api_nsim_output_feature_enable_disable_reply_t *rmp;
nsim_main_t *nsm = &nsim_main;
int rv;
VALIDATE_SW_IF_INDEX (mp);
rv = nsim_output_feature_enable_disable (nsm, ntohl (mp->sw_if_index),
(int) (mp->enable_disable));
BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_NSIM_OUTPUT_FEATURE_ENABLE_DISABLE_REPLY);
}
/* API message handler */
static void
vl_api_nsim_configure_t_handler (vl_api_nsim_configure_t * mp)
{
vl_api_nsim_configure_reply_t *rmp;
nsim_main_t *nsm = &nsim_main;
f64 delay, bandwidth, packet_size, drop_fraction;
u32 packets_per_drop;
int rv;
delay = ((f64) (ntohl (mp->delay_in_usec))) * 1e-6;
bandwidth = (f64) (clib_net_to_host_u64 (mp->bandwidth_in_bits_per_second));
packet_size = (f64) (ntohl (mp->average_packet_size));
packets_per_drop = ntohl (mp->packets_per_drop);
if (packets_per_drop > 0)
drop_fraction = 1.0 / (f64) (packets_per_drop);
else
drop_fraction = 0.0;
rv = nsim_configure (nsm, bandwidth, delay, packet_size, drop_fraction);
REPLY_MACRO (VL_API_NSIM_CONFIGURE_REPLY);
}
/*
* enable or disable the output_feature
*/
static clib_error_t *
nsim_output_feature_enable_disable_command_fn (vlib_main_t * vm,
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
nsim_main_t *nsm = &nsim_main;
unformat_input_t _line_input, *line_input = &_line_input;
u32 sw_if_index = ~0;
int enable_disable = 1;
int rv;
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "disable"))
enable_disable = 0;
else if (unformat (line_input, "%U", unformat_vnet_sw_interface,
nsm->vnet_main, &sw_if_index))
;
else
{
clib_error_t *error = clib_error_return (0, "unknown input `%U'",
format_unformat_error,
line_input);
unformat_free (line_input);
return error;
}
}
unformat_free (line_input);
if (sw_if_index == ~0)
return clib_error_return (0, "Please specify one interface...");
rv = nsim_output_feature_enable_disable (nsm, sw_if_index, enable_disable);
switch (rv)
{
case 0:
break;
case VNET_API_ERROR_CANNOT_ENABLE_DISABLE_FEATURE:
return clib_error_return (0, "Not configured, please 'set nsim' first");
case VNET_API_ERROR_INVALID_SW_IF_INDEX:
return clib_error_return
(0, "Invalid interface, only works on physical ports");
break;
case VNET_API_ERROR_UNIMPLEMENTED:
return clib_error_return (0,
"Device driver doesn't support redirection");
break;
default:
return clib_error_return
(0, "nsim_output_feature_enable_disable returned %d", rv);
}
return 0;
}
/*?
* Enable or disable network simulation output feature on an interface
* The network simulator must have already been configured, see
* the "nsim_configure" command.
*
* @cliexpar
* To enable or disable network simulation output feature
* @clistart
* nsim output-feature enable-disable TenGigabitEthernet2/0/0
* nsim output-feature enable-disable TenGigabitEthernet2/0/0 disable
* @cliend
* @cliexcmd{nsim output-feature enable-disable <intfc> [disable]}
?*/
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (nsim_output_feature_enable_disable_command, static) =
{
.path = "nsim output-feature enable-disable",
.short_help =
"nsim output-feature enable-disable <interface-name> [disable]",
.function = nsim_output_feature_enable_disable_command_fn,
};
/* *INDENT-ON* */
#include <nsim/nsim.api.c>
static clib_error_t *
nsim_init (vlib_main_t * vm)
{
nsim_main_t *nsm = &nsim_main;
nsm->vlib_main = vm;
nsm->vnet_main = vnet_get_main ();
/* Ask for a correctly-sized block of API message decode slots */
nsm->msg_id_base = setup_message_id_table ();
return 0;
}
VLIB_INIT_FUNCTION (nsim_init);
/* *INDENT-OFF* */
VNET_FEATURE_INIT (nsim, static) =
{
.arc_name = "device-input",
.node_name = "nsim",
.runs_before = VNET_FEATURES ("ethernet-input"),
};
/* *INDENT-ON */
/* *INDENT-OFF* */
VNET_FEATURE_INIT (nsim_feature, static) =
{
.arc_name = "interface-output",
.node_name = "nsim-output-feature",
.runs_before = VNET_FEATURES ("interface-tx"),
};
/* *INDENT-ON */
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
.description = "Network Delay Simulator",
};
/* *INDENT-ON* */
static uword
unformat_delay (unformat_input_t * input, va_list * args)
{
f64 *result = va_arg (*args, f64 *);
f64 tmp;
if (unformat (input, "%f us", &tmp))
*result = tmp * 1e-6;
else if (unformat (input, "%f ms", &tmp))
*result = tmp * 1e-3;
else if (unformat (input, "%f sec", &tmp))
*result = tmp;
else
return 0;
return 1;
}
static uword
unformat_bandwidth (unformat_input_t * input, va_list * args)
{
f64 *result = va_arg (*args, f64 *);
f64 tmp;
if (unformat (input, "%f gbit", &tmp))
*result = tmp * 1e9;
else if (unformat (input, "%f gbyte", &tmp))
*result = tmp * 8e9;
else
return 0;
return 1;
}
static clib_error_t *
set_nsim_command_fn (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
nsim_main_t *nsm = &nsim_main;
f64 delay, bandwidth;
f64 packet_size = 1500.0;
f64 drop_fraction = 0.0;
u32 packets_per_drop;
u32 num_workers = vlib_num_workers ();
int rv;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "delay %U", unformat_delay, &delay))
;
else if (unformat (input, "bandwidth %U", unformat_bandwidth,
&bandwidth))
;
else if (unformat (input, "packet-size %f", &packet_size))
;
else if (unformat (input, "packets-per-drop %d", &packets_per_drop))
{
if (packets_per_drop > 0)
drop_fraction = 1.0 / ((f64) packets_per_drop);
}
else if (unformat (input, "drop-fraction %f", &drop_fraction))
{
if (drop_fraction < 0.0 || drop_fraction > 1.0)
return clib_error_return
(0, "drop fraction must be between zero and 1");
}
else if (unformat (input, "poll-main-thread"))
nsm->poll_main_thread = 1;
else
break;
}
rv = nsim_configure (nsm, bandwidth, delay, packet_size, drop_fraction);
switch (rv)
{
case VNET_API_ERROR_INVALID_VALUE:
return clib_error_return (0, "invalid bandwidth %.2f", bandwidth);
case VNET_API_ERROR_INVALID_VALUE_2:
return clib_error_return (0, "invalid delay %.2f", delay);
case VNET_API_ERROR_INVALID_VALUE_3:
return clib_error_return (0, "invalid packet size %.2f", packet_size);
default:
return clib_error_return (0, "error %d", rv);
case 0:
break;
}
vlib_cli_output (vm, "Configured link delay %.2f ms, %.2f ms round-trip",
nsm->delay * 1e3, 2.0 * nsm->delay * 1e3);
if (nsm->drop_fraction > 0.0)
vlib_cli_output (vm, "... simulating a network drop fraction of %.5f",
nsm->drop_fraction);
if (num_workers)
vlib_cli_output (vm, "Sim uses %llu bytes per thread, %llu bytes total",
nsm->mmap_size, nsm->mmap_size * num_workers);
else
vlib_cli_output (vm, "Sim uses %llu bytes total", nsm->mmap_size);
return 0;
}
/*?
* Configure the network simulation cross-connect
* Once the simulator is configured, use the "nsim enable-disable" command
* to set up a cross-connect with the supplied delay characteristics.
*
* The cross connect configuration may be changed without restarting vpp
* but it is good practice to shut down the interfaces.
*
* @cliexpar
* To configure the network delay simulator:
* @clistart
* set nsim delay 10.0 ms bandwidth 5.5 gbit packet-size 128
*
* @cliend
* @cliexcmd{set nsim delay <nn> bandwidth <bb> packet-size <nn>}
?*/
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (set_nsim_command, static) =
{
.path = "set nsim",
.short_help = "set nsim delay <time> bandwidth <bps> packet-size <nbytes>\n"
" [packets-per-drop <nn>][drop-fraction <f64: 0.0 - 1.0>]",
.function = set_nsim_command_fn,
};
/* *INDENT-ON*/
static clib_error_t *
show_nsim_command_fn (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
nsim_main_t *nsm = &nsim_main;
u32 num_workers = vlib_num_workers ();
int verbose = 0;
if (nsm->is_configured == 0)
return clib_error_return (0, "Network simulator not configured");
if (nsm->sw_if_index0 == 0)
return clib_error_return (0, "Network simulator not enabled");
if (unformat (input, "verbose"))
verbose = 1;
vlib_cli_output (vm, "Network simulator cross-connects %U and %U",
format_vnet_sw_if_index_name,
nsm->vnet_main, nsm->sw_if_index0,
format_vnet_sw_if_index_name,
nsm->vnet_main, nsm->sw_if_index1);
vlib_cli_output (vm,
"...inserting link delay of %.2f ms, %.2f ms round-trip",
nsm->delay * 1e3, 2.0 * nsm->delay * 1e3);
if (nsm->drop_fraction > 0.0)
vlib_cli_output (vm, "... simulating a network drop fraction of %.5f",
nsm->drop_fraction);
if (verbose)
{
vlib_cli_output (vm, " Configured bandwidth: %.2f gbit/sec",
nsm->bandwidth / 1e9);
vlib_cli_output (vm, " Configured packet size: %f", nsm->packet_size);
if (num_workers)
vlib_cli_output
(vm, " Sim uses %llu bytes per thread, %llu bytes total",
nsm->mmap_size, nsm->mmap_size * num_workers);
else
vlib_cli_output (vm, " Sim uses %llu bytes total", nsm->mmap_size);
}
return 0;
}
/*?
* Display state info for the network delay simulator.
*
* @cliexpar
* To display the state of the network simulator
* @clistart
* show nsim verbose
* Network simulator cross-connects TenGigabitEthernet2/0/0 and TenGigabitEthernet2/0/1
* ...inserting link delay of 10.00 ms, 20.00 ms round-trip
* Configured bandwidth: 10.10 gbit/sec
* Configured packet size: 128
* Sim uses 157814784 bytes total
* @cliend
* @cliexcmd{show nsim}
?*/
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_nsim_command, static) =
{
.path = "show nsim",
.short_help = "Display network delay simulator configuration",
.function = show_nsim_command_fn,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/
|