ofs | hex dump | ascii |
---|
0000 | d4 c3 b2 a1 02 00 04 00 00 00 00 00 00 00 00 00 d0 07 00 00 01 00 00 00 32 d0 da 51 6d b1 0e 00 | ........................2..Qm... |
0020 | 40 00 00 00 40 00 00 00 90 e2 ba 18 4e aa 90 e2 ba 18 4e ab 08 00 45 00 00 2c 79 4c 00 00 80 06 | @...@.......N.....N...E..,yL.... |
0040 | 96 6f 15 00 00 06 16 00 00 0b c2 9e 01 bb 18 19 d8 d5 00 00 00 00 60 02 80 00 37 cd 00 00 02 04 | .o....................`...7..... |
0060 | 05 b4 00 00 f0 0a bc ab 32 d0 da 51 91 dc 0e 00 40 00 00 00 40 00 00 00 90 e2 ba 18 4e ab 90 e2 | ........2..Q....@...@.......N... |
0080 | ba 18 4e aa 08 00 45 00 00 2c 79 48 00 00 80 06 96 73 16 00 00 0b 15 00 00 06 01 bb c2 9e 18 1a | ..N...E..,yH.....s.............. |
00a0 | 84 f5 18 19 d8 d6 60 12 80 00 9a ac 00 00 02 04 05 b4 00 00 76 c1 dd 29 32 d0 da 51 b3 07 0f 00 | ......`.............v..)2..Q.... |
00c0 | 40 00 00 00 40 00 00 00 90 e2 ba 18 4e aa 90 e2 ba 18 4e ab 08 00 45 00 00 28 79 4f 00 00 80 06 | @...@.......N.....N...E..(yO.... |
00e0 | 96 70 15 00 00 06 16 00 00 0b c2 9e 01 bb 18 19 d8 d6 18 1a 84 f6 50 10 80 00 b2 69 00 00 00 00 | .p....................P....i.... |
0100 | 00 00 00 00 b0 62 21 df 32 d0 da 51 ba 07 0f 00 9f 00 00 00 9f 00 00 00 90 e2 ba 18 4e aa 90 e2 | .....b!.2..Q................N... |
0120 | ba 18 4e ab 08 00 45 00 00 8d 79 50 00 00 80 06 96 0a 15 00 00 06 16 00 00 0b c2 9e 01 bb 18 19 | ..N...E...yP.................... |
0140 | d8 d6 18 1a 84 f6 50 18 80 00 c9 98 00 00 16 03 01 00 60 01 00 00 5c 03 01 51 da dc 15 74 fc 35 | ......P...........`...\..Q...t.5 |
0160 | 30 13 e3 6e c4 2c 17 0c dd 7d 3c 3d 46 03 c2 d3 5b 23 46 42 2f 11 df bd 25 00 00 04 00 2f 00 ff | 0..n.,...}<=F...[#FB/...%..../.. |
0180 | 01 00 00 2f 00 23 00 00 00 0d 00 22 00 20 06 01 06 02 06 03 05 01 05 02 05 03 04 01 04 02 04 03 | .../.#.....".................... |
01a0 | 03 01 03 02 03 03 02 01 02 02 02 03 01 01 00 0f 00 01 01 82 6e 6d 10 32 d0 da 51 9a 33 0f 00 c0 | ....................nm.2..Q.3... |
01c0 | 02 00 00 c0 02 00 00 90 e2 ba 18 4e ab 90 e2 ba 18 4e aa 08 00 45 00 02 ae 79 4a 00 00 80 06 93 | ...........N.....N...E...yJ..... |
01e0 | ef 16 00 00 0b 15 00 00 06 01 bb c2 9e 18 1a 84 f6 18 19 d9 3b 50 18 80 00 ab c8 00 00 16 03 01 | ....................;P.......... |
0200 | 00 3a 02 00 00 36 03 01 51 da dc 15 96 7c 72 af a7 6d ac 55 06 d0 ec 11 ed 6f e0 7e 56 42 f7 b7 | .:...6..Q....|r..m.U.....o.~VB.. |
0220 | ed 19 69 d4 93 63 7d 45 00 00 2f 00 00 0e ff 01 00 01 00 00 23 00 00 00 0f 00 01 01 16 03 01 02 | ..i..c}E../.........#........... |
0240 | 39 0b 00 02 35 00 02 32 00 02 2f 30 82 02 2b 30 82 01 d5 02 01 01 30 0d 06 09 2a 86 48 86 f7 0d | 9...5..2../0..+0......0...*.H... |
0260 | 01 01 04 05 00 30 81 bd 31 24 30 22 06 03 55 04 0a 13 1b 53 70 69 72 65 6e 74 20 43 6f 6d 6d 75 | .....0..1$0"..U....Spirent.Commu |
0280 | 6e 69 63 61 74 69 6f 6e 73 20 49 6e 63 2e 31 12 30 10 06 03 55 04 0b 13 09 4d 61 72 6b 65 74 69 | nications.Inc.1.0...U....Marketi |
02a0 | 6e 67 31 23 30 21 06 09 2a 86 48 86 f7 0d 01 09 01 16 14 64 6c 2d 70 6d 40 73 70 69 72 65 6e 74 | ng1#0!..*.H........dl-pm@spirent |
02c0 | 63 6f 6d 2e 63 6f 6d 31 14 30 12 06 03 55 04 07 13 0b 53 61 6e 74 61 20 43 6c 61 72 61 31 13 30 | com.com1.0...U....Santa.Clara1.0 |
02e0 | 11 06 03 55 04 08 13 0a 43 61 6c 69 66 6f 72 6e 69 61 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 | ...U....California1.0...U....US1 |
0300 | 24 30 22 06 03 55 04 03 13 1b 53 70 69 72 65 6e 74 20 43 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 | $0"..U....Spirent.Communications |
0320 | 20 49 6e 63 2e 30 1e 17 0d 30 37 30 33 30 36 31 38 33 30 30 37 5a 17 0d 31 32 30 33 30 34 31 38 | .Inc.0...070306183007Z..12030418 |
0340 | 33 30 30 37 5a 30 81 82 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a | 3007Z0..1.0...U....US1.0...U.... |
0360 | 43 61 6c 69 66 6f 72 6e 69 61 31 24 30 22 06 03 55 04 0a 13 1b 53 70 69 72 65 6e 74 20 43 6f 6d | California1$0"..U....Spirent.Com |
0380 | 6d 75 6e 69 63 61 74 69 6f 6e 73 20 49 6e 63 2e 31 12 30 10 06 03 55 04 0b 13 09 4d 61 72 6b 65 | munications.Inc.1.0...U....Marke |
03a0 | 74 69 6e 67 31 24 30 22 06 03 55 04 03 13 1b 53 70 69 72 65 6e 74 20 43 6f 6d 6d 75 6e 69 63 61 | ting1$0"..U....Spirent.Communica |
03c0 | 74 69 6f 6e 73 20 49 6e 63 2e 30 5c 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 4b 00 30 48 | tions.Inc.0\0...*.H.........K.0H |
03e0 | 02 41 00 f8 4d 0c 80 56 6c 5c 26 6c cb 75 1a 1f d0 6a fb 68 4f 61 eb d6 a6 19 b8 56 0d e6 eb 5a | .A..M..Vl\&l.u...j.hOa.....V...Z |
0400 | 67 15 e1 98 c5 63 45 ce 2b 5c ac c8 71 2b 20 3b c1 0f 69 e9 97 dc 3d 4d 84 c9 6f a9 1a 25 b7 8e | g....cE.+\..q+.;..i...=M..o..%.. |
0420 | ce 4d 8d 02 03 01 00 01 30 0d 06 09 2a 86 48 86 f7 0d 01 01 04 05 00 03 41 00 1a c5 37 8c cb 04 | .M......0...*.H.........A...7... |
0440 | 43 14 2f 63 0d 4c d1 56 54 10 2e 85 71 1d 05 95 47 a9 03 1e 1e e4 77 64 ce c4 21 06 ba 07 fb df | C./c.L.VT...q...G.....wd..!..... |
0460 | 33 e1 a9 2e 6a 52 52 b8 3b dd 36 ca b9 60 eb 3d bc d4 66 28 cb 0a 7b 79 80 cf 16 03 01 00 04 0e | 3...jRR.;.6..`.=..f(..{y........ |
0480 | 00 00 00 29 c6 02 e9 33 d0 da 51 00 1e 00 00 c0 00 00 00 c0 00 00 00 90 e2 ba 18 4e aa 90 e2 ba | ...)...3..Q................N.... |
04a0 | 18 4e ab 08 00 45 00 00 ae 79 53 00 00 80 06 95 e6 15 00 00 06 16 00 00 0b c2 9e 01 bb 18 19 d9 | .N...E...yS..................... |
04c0 | 3b 18 1a 87 7c 50 18 80 00 15 cb 00 00 16 03 01 00 46 10 00 00 42 00 40 f2 84 81 36 cc 82 4d 06 | ;...|P...........F...B.@...6..M. |
04e0 | 4f 57 dd 76 93 c0 6b bd 9f d0 eb 5f a7 ed 50 2a 4e c9 2e 28 cc 43 db 37 8c 8c d8 3b bd dc d3 5d | OW.v..k...._..P*N..(.C.7...;...] |
0500 | 29 1e 4c 9a fc 23 3b 34 d2 a2 6e ae fb 05 e7 9b 15 5c 3d d7 67 a9 80 fc 14 03 01 00 01 01 16 03 | ).L..#;4..n......\=.g........... |
0520 | 01 00 30 14 29 56 77 42 cb b4 23 6a 7a 8d 40 4a a2 be ea d3 6c 70 79 21 fc f6 9b 03 46 87 fe 65 | ..0.)VwB..#jz.@J....lpy!....F..e |
0540 | 40 ec 1a 7d 21 a7 98 52 0c a9 25 ac 9b 55 ee b1 17 1c cd 60 d7 8e 35 33 d0 da 51 93 4a 00 00 24 | @..}!..R..%..U.....`..53..Q.J..$ |
0560 | 01 00 00 24 01 00 00 90 e2 ba 18 4e ab 90 e2 ba 18 4e aa 08 00 45 00 01 12 79 4d 00 00 80 06 95 | ...$.......N.....N...E...yM..... |
0580 | 88 16 00 00 0b 15 00 00 06 01 bb c2 9e 18 1a 87 7c 18 19 d9 c1 50 18 80 00 bd 5e 00 00 16 03 01 | ................|....P....^..... |
05a0 | 00 aa 04 00 00 a6 00 00 01 2c 00 a0 f0 61 56 c1 d6 0a 2a 25 2c b1 4b 55 e0 00 ef 36 37 68 72 dd | .........,...aV...*%,.KU...67hr. |
05c0 | 32 12 24 96 39 e6 28 22 c1 8b c6 56 7f 49 74 9e 55 1a f6 59 83 40 4f ee 5d 19 cc 7e 64 13 a9 6e | 2.$.9.("...V.It.U..Y.@O.]..~d..n |
05e0 | 32 99 c4 66 9e db de 2a 8c 0c b6 c6 cf 0c 8e 69 83 bf 38 0d dc 1a 81 a8 f6 d0 57 e2 0c 84 12 70 | 2..f...*.......i..8.......W....p |
0600 | 7c 89 08 2f 0b 0f 7a 24 92 5a fe 2b 1e 48 ca e2 55 56 de 50 05 76 d1 93 4e a3 09 86 ef 68 27 49 | |../..z$.Z.+.H..UV.P.v..N....h'I |
0620 | 88 00 1e 33 ab df 43 58 c8 2d b4 42 49 e7 5d fd c8 76 64 2d 3f d3 51 08 f8 08 38 49 ac 84 fa ff | ...3..CX.-.BI.]..vd-?.Q...8I.... |
0640 | af 89 08 70 bc ee 2d 13 2b 70 f8 c8 14 03 01 00 01 01 16 03 01 00 30 9b b8 87 8f 73 9a 59 56 27 | ...p..-.+p............0....s.YV' |
0660 | f6 da e7 bb 5d 93 f0 51 a7 9e ff bf de dc f3 8e a3 65 2c ff ff 30 4a 7e 63 60 3f 7c f6 59 2a 1f | ....]..Q.........e,..0J~c`?|.Y*. |
0680 | d5 7f 2f 5a 54 06 ba 17 e6 6e 71 33 d0 da 51 e4 75 00 00 84 01 00 00 84 01 00 00 90 e2 ba 18 4e | ../ZT....nq3..Q.u..............N |
06a0 | aa 90 e2 ba 18 4e ab 08 00 45 00 01 72 79 55 00 00 80 06 95 20 15 00 00 06 16 00 00 0b c2 9e 01 | .....N...E..ryU................. |
06c0 | bb 18 19 d9 c1 18 1a 88 66 50 18 80 00 7a 1a 00 00 17 03 01 00 20 33 54 07 e4 e8 4d a2 a2 4c ed | ........fP...z........3T...M..L. |
06e0 | 7f f5 36 70 bd bd 76 05 16 4d 7c 58 9b b1 4f 4f 07 cc 8c cd 9f a3 17 03 01 01 20 71 a1 27 af ab | ..6p..v..M|X..OO...........q.'.. |
0700 | 24 0c 24 d5 32 09 b4 4e 43 2c d0 15 d3 7f 1b 6f 66 21 7d c5 1f 2f 44 bb 85 0a b1 60 a3 1c 5c 6c | $.$.2..NC,.....of!}../D....`..\l |
0720 | b6 bf 7f e9 c3 39 82 9c 12 33 f1 1c 2b 9b f8 33 ac 10 bc 3f b0 ec 58 85 ef 69 d0 6d 38 e9 97 5e | .....9...3..+..3...?..X..i.m8..^ |
0740 | c7 44 d6 ff 41 12 c3 37 7f 48 43 4f a5 08 67 56 6e 83 74 0f 3e ee 1f 27 a8 95 4e 1d 5f 20 92 d7 | .D..A..7.HCO..gVn.t.>..'..N._... |
0760 | 6c 82 4b 02 28 4d cd 1a e3 b7 5a d0 24 bd 75 83 fe 1f 9a 03 1c b4 9f e9 0e 21 0e 5a f1 bd 2d 7b | l.K.(M....Z.$.u..........!.Z..-{ |
0780 | 33 c0 26 e2 6b 1f 03 72 3e db 51 a9 cf 3d 67 80 8b d8 0a 1d 5e af 19 6c 68 d8 13 23 26 82 56 db | 3.&.k..r>.Q..=g.....^..lh..#&.V. |
07a0 | b7 9f c4 31 c7 d5 13 2c 22 69 7c 7b 79 0c a3 1a d8 21 c7 6c fd 8e dc df c0 a5 3d 7f 32 d7 fd d7 | ...1...,"i|{y....!.l......=.2... |
07c0 | 01 9d 83 20 27 51 d8 62 c9 3b 7f db 58 0c ef 5d 22 c5 71 be f7 79 61 e0 e9 b0 e9 dc c6 1c 48 86 | ....'Q.b.;..X..]".q..ya.......H. |
07e0 | 19 fc 6a dd 79 ab 03 51 e9 46 9a 04 2e 42 f5 94 3a 5a 92 9b 10 0e 12 76 8f cc 28 c8 cc 60 5e e5 | ..j.y..Q.F...B..:Z.....v..(..`^. |
0800 | 4b 26 6d 1c c6 04 57 b6 50 73 9e cb 49 5e 1d 9d d1 09 98 2c ff c6 20 79 cb 4b 2c 41 3c 7f c8 33 | K&m...W.Ps..I^.....,...y.K,A<..3 |
0820 | d0 da 51 4a a1 00 00 ee 05 00 00 ee 05 00 00 90 e2 ba 18 4e ab 90 e2 ba 18 4e aa 08 00 45 00 05 | ..QJ...............N.....N...E.. |
0840 | dc 79 51 00 00 80 06 90 ba 16 00 00 0b 15 00 00 06 01 bb c2 9e 18 1a 88 66 18 19 db 0b 50 18 80 | .yQ.....................f....P.. |
0860 | 00 c1 63 00 00 17 03 01 00 20 eb 58 fa a0 87 55 fe 39 be 13 29 35 88 73 5d 61 df b6 ec 79 92 3f | ..c........X...U.9..)5.s]a...y.? |
0880 | 9a 7d 31 62 49 84 39 98 f1 24 17 03 01 05 c0 d3 42 d1 c9 08 29 27 88 d0 45 0d c0 a6 1f 10 94 77 | .}1bI.9..$......B...)'..E......w |
08a0 | a2 2a 50 c6 20 11 29 4a 7c f4 56 b7 6e 58 f7 0f 07 22 99 c5 e6 17 a2 80 dd e1 7a cf 0e 02 c1 8b | .*P...)J|.V.nX..."........z..... |
08c0 | e1 1c af f6 76 e6 5d 90 8b 99 22 82 11 ac 40 ed 27 b3 03 ab 83 4c ec 5f 2d b5 3d 35 ff d3 3c eb | ....v.]..."...@.'....L._-.=5..<. |
08e0 | 79 55 70 05 9b 43 53 a0 92 df a8 d7 2e 89 01 3b 03 5a 80 f8 a9 f3 e3 d0 df a2 2c e6 d2 2c 41 8d | yUp..CS........;.Z........,..,A. |
0900 | fc bb 8f 17 ad 3c 93 6b 07 9c 71 52 3a 51 17 10 92 09 7e 6a 3a 3b 88 2c f4 b5 6a 9b 25 c2 f2 ed | .....<.k..qR:Q....~j:;.,..j.%... |
0920 | 3b c5 90 2c c8 e8 95 5e 02 b3 90 4f 22 e4 2e e4 11 ca c5 56 56 14 de 60 0a 2f b1 4c 5b 7e 53 48 | ;..,...^...O"......VV..`./.L[~SH |
0940 | 19 1a bf e9 cb 49 d4 0a 3e 25 e0 6a 86 b1 05 98 58 72 d9 2c 8f 90 e0 4a 9a db 63 44 3c 49 7a 1a | .....I..>%.j....Xr.,...J..cD<Iz. |
0960 | 74 2b 5c 76 b5 88 77 a1 0b 43 ee 68 6b 20 df 02 ee 6f 0f f5 e0 10 0f 76 9f 46 7e 97 cc cd 04 a4 | t+\v..w..C.hk....o.....v.F~..... |
0980 | 1b 63 17 fd 1a 97 52 da 1f 1a 8d af 8a fb 60 e4 3f 6e 79 c0 71 3a fd 96 ef eb 54 03 48 76 0b 5f | .c....R.......`.?ny.q:....T.Hv._ |
09a0 | 58 8f a4 64 99 3b 13 d6 78 b1 a5 ba 20 f0 77 4f 70 08 e5 a4 e7 5b e1 12 15 22 4a d1 46 cb a3 c8 | X..d.;..x.....wOp....[..."J.F... |
09c0 | ca 8a 0f 5f 52 c1 61 59 6b 36 38 d1 44 ce 78 b6 fa 57 da ff 3f 7a 9e 4a 30 7b da 5a 06 0e ca a4 | ..._R.aYk68.D.x..W..?z.J0{.Z.... |
09e0 | 86 f6 9b 47 f3 c9 72 a9 06 98 28 aa ea e6 9f c3 64 6b 0b 2d d1 85 89 0b 93 dc 80 99 cc 5e 08 73 | ...G..r...(.....dk.-.........^.s |
0a00 | 8c 79 89 b1 d0 e9 57 2c a5 42 69 5e 86 cd 56 6e 0e 55 f5 0a 93 8c 94 70 88 5c 30 c2 2b a2 55 c2 | .y....W,.Bi^..Vn.U.....p.\0.+.U. |
0a20 | 3d c6 d3 24 d8 9d 55 df 18 0d bb fe b9 b3 52 56 8f 59 00 bf 4e d4 1e 8f 27 c5 52 19 47 01 98 95 | =..$..U.......RV.Y..N...'.R.G... |
0a40 | 55 09 8b f9 c0 79 d7 d3 f3 84 49 44 04 13 63 fa 96 ce 47 a0 ba 1b ce f8 f7 00 a9 f2 a1 ce a1 af | U....y....ID..c...G............. |
0a60 | 85 73 28 ee 1a 98 b4 30 97 75 21 8e 9a 69 b2 d1 1e 74 b2 bc 9e 62 d3 7c 04 5a 54 c4 61 79 99 ab | .s(....0.u!..i...t...b.|.ZT.ay.. |
0a80 | b6 b4 f0 90 68 bb 16 2e dc 8a cf cd 82 6d 36 49 7d 97 2c a9 0f 82 ab 02 49 79 9c 84 df f2 63 e6 | ....h........m6I}.,.....Iy....c. |
0aa0 | 02 d3 a5 85 84 69 40 f1 52 fc 80 3e 66 8d c9 76 48 cd de ab 23 1c 80 e6 bb 93 d2 39 3f 02 d8 26 | .....i@.R..>f..vH...#......9?..& |
0ac0 | d1 ae fc f9 2e 56 43 ad e5 41 d0 4e 96 80 b1 69 83 4d 53 9a 19 99 2b 43 84 3b 31 7b 5c c5 8f 25 | .....VC..A.N...i.MS...+C.;1{\..% |
0ae0 | 80 9d 80 5b 1f 91 34 cf 97 2a 5c 6b 88 59 34 f8 06 47 cd cb b3 04 7d f2 2a 6a 79 04 84 98 3b 6a | ...[..4..*\k.Y4..G....}.*jy...;j |
0b00 | 13 9d 0a 39 e2 1b d9 eb 33 12 07 d9 e4 fa 8c 66 1b 7c 88 6e 62 11 8c 96 11 a5 de 4a d7 74 82 86 | ...9....3......f.|.nb......J.t.. |
0b20 | 1d 49 dc e2 2a d1 d1 ce ac 15 30 54 b5 27 fe 46 8c b2 78 59 1c e7 be ed 32 3e 83 07 13 1e 8c 25 | .I..*.....0T.'.F..xY....2>.....% |
0b40 | b0 bb 3e 1c 0c 59 2a fb 48 13 d1 7b fc b5 12 81 86 f7 73 4d 94 2d 57 e9 c9 0a 88 50 e2 e8 5e 57 | ..>..Y*.H..{......sM.-W....P..^W |
0b60 | 53 50 07 c3 cf 02 c2 22 c9 39 8e b2 0e 2d c9 77 b0 13 29 00 9c 9d e7 62 36 23 6b 8d 35 a8 29 fd | SP.....".9...-.w..)....b6#k.5.). |
0b80 | bf 6f f8 58 cc 0d fc 26 29 51 29 30 c4 1a 21 a4 94 ad 74 76 56 cc a0 88 09 a0 ca 40 63 44 e7 7d | .o.X...&)Q)0..!...tvV......@cD.} |
0ba0 | b4 49 60 24 bd c3 b6 78 45 75 6f b4 f1 df 50 78 0b ea 3b d7 f6 83 f8 a2 99 ca 2a e9 9e aa 1a 8a | .I`$...xEuo...Px..;.......*..... |
0bc0 | 47 39 c8 45 a6 88 35 05 ad 4e 13 07 99 96 e6 6d 0d 8d 0b 75 60 d5 b1 48 61 04 aa 15 fd 6a 5c d7 | G9.E..5..N.....m...u`..Ha....j\. |
0be0 | 73 73 43 73 86 8f 1d dd e7 78 d8 5a b6 f3 af 1f 8a 00 02 02 01 9f 77 cc 8d 81 49 c3 8e 3c 88 fb | ssCs.....x.Z..........w...I..<.. |
0c00 | e9 5f 76 61 17 ab 88 3a 5d 99 cd 05 78 2e f4 43 20 a5 03 bc 23 c9 f7 51 4a 94 c7 7b 5a c8 69 55 | ._va...:]...x..C....#..QJ..{Z.iU |
0c20 | 58 a0 9e 14 df 6c 43 16 53 f7 31 a0 8d af c6 49 99 c7 bd b4 d4 62 60 bc c9 ae 6c 02 f8 01 10 8e | X....lC.S.1....I.....b`...l..... |
0c40 | f1 ed 31 64 3a 68 47 ea e9 2e 25 b7 68 ae be c4 0d a0 d9 40 a4 40 e6 23 4c cd 25 c7 90 79 65 56 | ..1d:hG...%.h......@.@.#L.%..yeV |
0c60 | bf 44 28 d1 82 72 01 8c 68 da fc d3 40 4b ea 4c d5 21 1b 62 3d 45 2b 4b 4f 0e 5c 94 a1 91 96 6f | .D(..r..h...@K.L.!.b=E+KO.\....o |
0c80 | 68 e7 5a 6f f0 c5 86 85 ef 34 65 b7 75 cf 1a 63 ca 5f cf 25 b7 45 2b 2a cd 85 f7 31 de b6 86 43 | h.Zo.....4e.u..c._.%.E+*...1...C |
0ca0 | 40 f1 46 40 3f 06 fe 2d 2a 7c 39 37 cc ee fe 6e fe f6 65 41 e8 51 a6 e4 f5 1d c3 eb d3 0e 11 c4 | @.F@?..-*|97...n..eA.Q.......... |
0cc0 | 80 e4 a3 b7 10 ce e3 39 aa e3 69 b2 0c 38 eb c1 84 5f 22 25 30 4a 33 c9 6e 4d a3 bc 80 89 e5 89 | .......9..i..8..._"%0J3.nM...... |
0ce0 | 96 1b 82 ab 98 47 d8 7a 2b 1e 43 4a 68 ed 33 08 23 fd c2 e1 0a 62 13 74 95 5e 27 ff ad e4 c6 19 | .....G.z+.CJh.3.#....b.t.^'..... |
0d00 | ff 7c 21 48 bc 4c c4 c0 a6 23 27 46 ef 11 49 a1 09 c6 33 89 fe 51 f1 14 d3 36 95 89 0a c9 c5 6a | .|!H.L...#'F..I...3..Q...6.....j |
0d20 | a7 c3 14 2e 5c 76 d7 a0 b6 fc 53 34 e7 70 0e d6 53 22 d8 1e 7e 8d ce 8f 8f 84 9c 08 b7 da fe 26 | ....\v....S4.p..S"..~..........& |
0d40 | 1b ef 48 10 ab e4 b2 0b e4 94 06 1a 51 24 ee 36 8b 10 3c 39 b7 c3 10 96 e5 d6 4f 76 d9 67 2d f6 | ..H.........Q$.6..<9......Ov.g-. |
0d60 | 35 ff cc e9 b6 c6 64 1c 7d 51 12 ef 28 24 c0 19 bf 54 68 09 61 a9 7a d9 1c e5 b2 bd 54 14 7c 6a | 5.....d.}Q..($...Th.a.z.....T.|j |
0d80 | e1 de 8c dc c7 c0 93 dd 72 d1 c7 46 56 6e 91 68 61 8c 86 e0 5d f4 45 78 c4 3b 17 49 3c 1b 73 b4 | ........r..FVn.ha...].Ex.;.I<.s. |
0da0 | 28 c4 a2 ae 54 05 1f f1 86 b0 1f 4d 68 a4 df 44 8c 9e 2e 46 f4 8d a4 25 69 53 0d 96 77 2c 07 33 | (...T......Mh..D...F...%iS..w,.3 |
0dc0 | 78 64 e4 e0 75 57 60 16 54 3b 1f d7 28 37 15 90 cc dc 38 d7 3f 90 5b 84 3e a1 14 63 0a ba d3 c6 | xd..uW`.T;..(7....8.?.[.>..c.... |
0de0 | 9e 44 f5 e7 16 7b 23 c3 94 e0 ee 80 d5 00 b4 15 27 ab c1 c0 6a ca 87 f6 54 63 67 7f 7c 01 4e 9e | .D...{#.........'...j...Tcg.|.N. |
0e00 | a6 9f e3 7f 5d 44 54 5d 8a fb 3d 37 e9 9b 8c 7d d2 13 c1 1d 03 46 25 ea cc da 40 80 07 33 d0 da | ....]DT]..=7...}.....F%...@..3.. |
0e20 | 51 57 a1 00 00 ee 05 00 00 ee 05 00 00 90 e2 ba 18 4e ab 90 e2 ba 18 4e aa 08 00 45 00 05 dc 79 | QW...............N.....N...E...y |
0e40 | 52 00 00 80 06 90 b9 16 00 00 0b 15 00 00 06 01 bb c2 9e 18 1a 8e 1a 18 19 db 0b 50 18 80 00 2b | R..........................P...+ |
0e60 | b8 00 00 6a 47 b5 2d 2d 82 b7 de 3a 48 25 aa b3 d4 65 c1 12 9c 26 2a cb 0a 71 bf f9 23 64 a6 ac | ...jG.--...:H%...e...&*..q..#d.. |
0e80 | c1 ce 2c d1 78 93 1f 88 22 f9 16 2a d4 dc 50 37 fa 46 13 0b 8c d7 d1 51 56 17 03 01 00 20 8b fa | ..,.x..."..*..P7.F.....QV....... |
0ea0 | d3 41 c1 6c 39 f8 7a 86 9a c8 cc 64 20 95 b3 67 8a 28 01 25 57 ca 72 2b af 18 ad 27 11 d5 17 03 | .A.l9.z....d...g.(.%W.r+...'.... |
0ec0 | 01 05 c0 d9 2b 5f 8e b9 88 50 29 3a 17 29 e4 6e 24 3b 44 d1 fc c5 83 5d b8 57 5f c3 e3 be bd 83 | ....+_...P):.).n$;D....].W_..... |
0ee0 | b0 2e c3 2d 57 a6 b0 ef 4d e1 97 ca 08 e8 58 41 af b2 8b 0a d1 70 e2 7f 93 ec 66 31 f7 c5 f9 74 | ...-W...M.....XA.....p....f1...t |
0f00 | f6 51 e8 e1 38 3f f7 1a 60 fe b7 cc 5e 46 1e 06 14 4b d9 72 88 d5 d3 bb f8 2a 5b ae 64 45 95 03 | .Q..8?..`...^F...K.r.....*[.dE.. |
0f20 | 29 f6 36 3b de 0f 57 71 5e 4b f3 e4 3b 90 a1 8a 45 d1 e3 d5 c1 b9 11 b5 61 f9 3c f0 6f 96 68 ff | ).6;..Wq^K..;...E.......a.<.o.h. |
0f40 | 4d a9 3d fe c9 f0 f3 02 f6 bd e9 53 d6 aa a0 41 78 db 81 02 5a ed 7f ae ad d3 b2 48 72 5d ab 9f | M.=........S...Ax...Z......Hr].. |
0f60 | 73 01 1d 4d a8 c3 6c dc 81 9c 4c cb 90 fb 70 8b 6a ec a3 ea ec 6f 86 b0 96 9f 1b 31 be 14 b8 38 | s..M..l...L...p.j....o.....1...8 |
0f80 | 38 36 b8 17 fc aa fa e6 6b c4 38 22 64 ff ee 27 fd 84 ab ec 50 a7 a2 30 44 50 9d 53 d6 d4 c2 83 | 86......k.8"d..'....P..0DP.S.... |
0fa0 | fd 31 c6 c2 ce c7 1a a5 0c 2f 3d 3f 32 28 b0 da 11 ea 73 47 e9 bb 46 f0 d7 7e 94 88 71 68 de 00 | .1......./=?2(....sG..F..~..qh.. |
0fc0 | d9 68 d5 70 1a 43 ab a3 64 1c 9f d5 37 a8 04 5a 74 45 6e 5f 42 a3 d5 f8 95 1b 6b 2b cc 55 f5 f7 | .h.p.C..d...7..ZtEn_B.....k+.U.. |
0fe0 | 72 05 f0 b8 6e f4 27 45 eb 5c a9 70 d5 98 f3 00 6e dc 02 3c e2 a6 07 d7 e3 99 72 31 05 76 db 61 | r...n.'E.\.p....n..<......r1.v.a |
1000 | fa f2 6c 69 40 d6 ff b2 ab 93 0b ba 8b 2f 37 e3 18 7b 37 e9 cb d5 3f 0f 58 2c 4a ee 14 ea da 80 | ..li@......../7..{7...?.X,J..... |
1020 | 9d d0 d4 27 26 b4 14 50 96 57 65 03 26 b6 14 84 12 e1 0d f2 a1 28 ae d7 f7 52 7c f2 fd 01 86 2a | ...'&..P.We.&........(...R|....* |
1040 | f6 df 99 e9 91 30 f2 93 19 89 97 8b ab 93 a0 3d 02 21 2c 4a 06 16 a1 83 11 7a 8f 4e 07 0f 53 2e | .....0.........=.!,J.....z.N..S. |
1060 | 8d 34 7f fc 76 48 23 a3 67 ce 50 d6 d0 a1 79 6c 6e ff 64 33 3e e9 00 72 63 5e 64 59 14 62 c5 f0 | .4..vH#.g.P...yln.d3>..rc^dY.b.. |
1080 | 0f 55 7d f7 25 a5 25 69 b3 40 4f 86 16 9b 9e 0a d9 fc 4d 76 a0 e8 99 8a be 6e 56 9e 25 a9 65 da | .U}.%.%i.@O.......Mv.....nV.%.e. |
10a0 | c4 77 c6 5a f4 38 ec 3d 65 33 5c fa f3 c5 ed 48 9c 65 38 76 e5 64 e4 67 39 59 55 52 9a fd 0f db | .w.Z.8.=e3\....H.e8v.d.g9YUR.... |
10c0 | db 69 77 71 7a df e6 b3 f2 cd 33 ba 81 5a c2 9a e0 62 23 2d 1f ed 47 a4 0e 6c 23 5d 1f 8f c7 f1 | .iwqz.....3..Z...b#-..G..l#].... |
10e0 | 03 8b 91 5f f8 c1 83 0a 38 c3 e7 ab 1c c8 c6 69 e5 ef cd 77 9e 07 14 c1 0e 37 d1 64 11 ae b8 54 | ..._....8......i...w.....7.d...T |
1100 | 76 0c 54 3c 45 cc dd a5 9c 1a 2e 52 ca e9 f9 d8 b7 53 a2 c4 f8 8c 6b 0e a7 d9 9e 25 12 c8 06 17 | v.T<E......R.....S....k....%.... |
1120 | 52 eb 39 ce 98 f4 a9 24 20 82 ae a0 82 3f 7d 9e f4 07 3c 2e db 19 94 56 b1 c4 37 de f7 42 47 6b | R.9....$.....?}...<....V..7..BGk |
1140 | 45 8e 20 9b 50 e1 61 e1 c7 85 b0 49 13 07 df 6d e2 84 d1 8c 1b f5 b1 22 84 e1 74 24 28 ec f2 25/*
* l2_vtr.c : layer 2 vlan tag rewrite configuration
*
* Copyright (c) 2013 Cisco and/or its affiliates.
* 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.
*/
#include <vlib/vlib.h>
#include <vnet/vnet.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/ethernet/packet.h>
#include <vnet/l2/l2_input.h>
#include <vnet/l2/l2_output.h>
#include <vnet/l2/feat_bitmap.h>
#include <vnet/l2/l2_vtr.h>
#include <vnet/l2/l2_input_vtr.h>
#include <vnet/l2/l2_output.h>
#include <vppinfra/error.h>
#include <vlib/cli.h>
/**
* @file
* @brief Ethernet VLAN Tag Rewrite.
*
* VLAN tag rewrite provides the ability to change the VLAN tags on a packet.
* Existing tags can be popped, new tags can be pushed, and existing tags can
* be swapped with new tags. The rewrite feature is attached to a subinterface
* as input and output operations. The input operation is explicitly configured.
* The output operation is the symmetric opposite and is automatically derived
* from the input operation.
*/
/** Just a placeholder; ensures file is not eliminated by linker. */
clib_error_t *
l2_vtr_init (vlib_main_t * vm)
{
return 0;
}
VLIB_INIT_FUNCTION (l2_vtr_init);
u32
l2pbb_configure (vlib_main_t * vlib_main,
vnet_main_t * vnet_main, u32 sw_if_index, u32 vtr_op,
u8 * b_dmac, u8 * b_smac,
u16 b_vlanid, u32 i_sid, u16 vlan_outer_tag)
{
u32 error = 0;
u32 enable = 0;
l2_output_config_t *config = 0;
vnet_hw_interface_t *hi;
hi = vnet_get_sup_hw_interface_api_visible_or_null (vnet_main, sw_if_index);
if (!hi)
{
error = VNET_API_ERROR_INVALID_INTERFACE;
goto done;
}
// Config for this interface should be already initialized
ptr_config_t *in_config;
ptr_config_t *out_config;
config = vec_elt_at_index (l2output_main.configs, sw_if_index);
in_config = &(config->input_pbb_vtr);
out_config = &(config->output_pbb_vtr);
in_config->pop_bytes = 0;
in_config->push_bytes = 0;
out_config->pop_bytes = 0;
out_config->push_bytes = 0;
enable = (vtr_op != L2_VTR_DISABLED);
if (!enable)
goto done;
if (vtr_op == L2_VTR_POP_2)
{
in_config->pop_bytes = sizeof (ethernet_pbb_header_packed_t);
}
else if (vtr_op == L2_VTR_PUSH_2)
{
clib_memcpy_fast (in_config->macs_tags.b_dst_address, b_dmac,
sizeof (in_config->macs_tags.b_dst_address));
clib_memcpy_fast (in_config->macs_tags.b_src_address, b_smac,
sizeof (in_config->macs_tags.b_src_address));
in_config->macs_tags.b_type =
clib_net_to_host_u16 (ETHERNET_TYPE_DOT1AD);
in_config->macs_tags.priority_dei_id =
clib_net_to_host_u16 (b_vlanid & 0xFFF);
in_config->macs_tags.i_type =
clib_net_to_host_u16 (ETHERNET_TYPE_DOT1AH);
in_config->macs_tags.priority_dei_uca_res_sid =
clib_net_to_host_u32 (i_sid & 0xFFFFF);
in_config->push_bytes = sizeof (ethernet_pbb_header_packed_t);
}
else if (vtr_op == L2_VTR_TRANSLATE_2_2)
{
/* TODO after PoC */
}
/*
* Construct the output tag-rewrite config
*
* The push/pop values are always reversed
*/
out_config->raw_data = in_config->raw_data;
out_config->pop_bytes = in_config->push_bytes;
out_config->push_bytes = in_config->pop_bytes;
done:
l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_VTR, enable);
if (config)
config->out_vtr_flag = (u8) enable;
/* output vtr enable is checked explicitly in l2_output */
return error;
}
/**
* Configure vtag tag rewrite on the given interface.
* Return 1 if there is an error, 0 if ok
*/
u32
l2vtr_configure (vlib_main_t * vlib_main, vnet_main_t * vnet_main, u32 sw_if_index, u32 vtr_op, u32 push_dot1q, /* ethertype of first pushed tag is dot1q/dot1ad */
u32 vtr_tag1, /* first pushed tag */
u32 vtr_tag2) /* second pushed tag */
{
vnet_hw_interface_t *hi;
vnet_sw_interface_t *si;
u32 hw_no_tags;
u32 error = 0;
l2_output_config_t *config;
vtr_config_t *in_config;
vtr_config_t *out_config;
u32 enable;
u32 push_inner_et;
u32 push_outer_et;
u32 cfg_tags;
hi = vnet_get_sup_hw_interface_api_visible_or_null (vnet_main, sw_if_index);
if (!hi || (hi->hw_class_index != ethernet_hw_interface_class.index))
{
error = VNET_API_ERROR_INVALID_INTERFACE; /* non-ethernet interface */
goto done;
}
/* Init the config for this interface */
vec_validate (l2output_main.configs, sw_if_index);
config = vec_elt_at_index (l2output_main.configs, sw_if_index);
in_config = &(config->input_vtr);
out_config = &(config->output_vtr);
in_config->raw_tags = 0;
out_config->raw_tags = 0;
/* Get the configured tags for the interface */
si = vnet_get_sw_interface (vnet_main, sw_if_index);
hw_no_tags = (si->type == VNET_SW_INTERFACE_TYPE_HARDWARE);
/* Construct the input tag-rewrite config */
push_outer_et =
clib_net_to_host_u16 (push_dot1q ? ETHERNET_TYPE_VLAN :
ETHERNET_TYPE_DOT1AD);
push_inner_et = clib_net_to_host_u16 (ETHERNET_TYPE_VLAN);
vtr_tag1 = clib_net_to_host_u16 (vtr_tag1);
vtr_tag2 = clib_net_to_host_u16 (vtr_tag2);
/* Determine number of vlan tags with explicitly configured values */
cfg_tags = 0;
if (hw_no_tags || si->sub.eth.flags.no_tags)
{
cfg_tags = 0;
}
else if (si->sub.eth.flags.one_tag)
{
cfg_tags = 1;
if (si->sub.eth.flags.outer_vlan_id_any)
{
cfg_tags = 0;
}
}
else if (si->sub.eth.flags.two_tags)
{
cfg_tags = 2;
if (si->sub.eth.flags.inner_vlan_id_any)
{
cfg_tags = 1;
}
if (si->sub.eth.flags.outer_vlan_id_any)
{
cfg_tags = 0;
}
}
switch (vtr_op)
{
case L2_VTR_DISABLED:
in_config->push_and_pop_bytes = 0;
break;
case L2_VTR_POP_1:
if (cfg_tags < 1)
{
/* Need one or two tags */
error = VNET_API_ERROR_INVALID_VLAN_TAG_COUNT;
goto done;
}
in_config->pop_bytes = 4;
in_config->push_bytes = 0;
break;
case L2_VTR_POP_2:
if (cfg_tags < 2)
{
error = VNET_API_ERROR_INVALID_VLAN_TAG_COUNT; /* Need two tags */
goto done;
}
in_config->pop_bytes = 8;
in_config->push_bytes = 0;
break;
case L2_VTR_PUSH_1:
in_config->pop_bytes = 0;
in_config->push_bytes = 4;
in_config->tags[1].priority_cfi_and_id = vtr_tag1;
in_config->tags[1].type = push_outer_et;
break;
case L2_VTR_PUSH_2:
in_config->pop_bytes = 0;
in_config->push_bytes = 8;
in_config->tags[0].priority_cfi_and_id = vtr_tag1;
in_config->tags[0].type = push_outer_et;
in_config->tags[1].priority_cfi_and_id = vtr_tag2;
in_config->tags[1].type = push_inner_et;
break;
case L2_VTR_TRANSLATE_1_1:
if (cfg_tags < 1)
{
error = VNET_API_ERROR_INVALID_VLAN_TAG_COUNT; /* Need one or two tags */
goto done;
}
in_config->pop_bytes = 4;
in_config->push_bytes = 4;
in_config->tags[1].priority_cfi_and_id = vtr_tag1;
in_config->tags[1].type = push_outer_et;
break;
case L2_VTR_TRANSLATE_1_2:
if (cfg_tags < 1)
{
error = VNET_API_ERROR_INVALID_VLAN_TAG_COUNT; /* Need one or two tags */
goto done;
}
in_config->pop_bytes = 4;
in_config->push_bytes = 8;
in_config->tags[0].priority_cfi_and_id = vtr_tag1;
in_config->tags[0].type = push_outer_et;
in_config->tags[1].priority_cfi_and_id = vtr_tag2;
in_config->tags[1].type = push_inner_et;
break;
case L2_VTR_TRANSLATE_2_1:
if (cfg_tags < 2)
{
error = VNET_API_ERROR_INVALID_VLAN_TAG_COUNT; /* Need two tags */
goto done;
}
in_config->pop_bytes = 8;
in_config->push_bytes = 4;
in_config->tags[1].priority_cfi_and_id = vtr_tag1;
in_config->tags[1].type = push_outer_et;
break;
case L2_VTR_TRANSLATE_2_2:
if (cfg_tags < 2)
{
error = VNET_API_ERROR_INVALID_VLAN_TAG_COUNT; /* Need two tags */
goto done;
}
in_config->pop_bytes = 8;
in_config->push_bytes = 8;
in_config->tags[0].priority_cfi_and_id = vtr_tag1;
in_config->tags[0].type = push_outer_et;
in_config->tags[1].priority_cfi_and_id = vtr_tag2;
in_config->tags[1].type = push_inner_et;
break;
}
/*
* Construct the output tag-rewrite config
*
* The push/pop values are always reversed
*/
out_config->push_bytes = in_config->pop_bytes;
out_config->pop_bytes = in_config->push_bytes;
/* Any pushed tags are derived from the subinterface config */
push_outer_et =
clib_net_to_host_u16 (si->sub.eth.flags.dot1ad ? ETHERNET_TYPE_DOT1AD :
ETHERNET_TYPE_VLAN);
push_inner_et = clib_net_to_host_u16 (ETHERNET_TYPE_VLAN);
vtr_tag1 = clib_net_to_host_u16 (si->sub.eth.outer_vlan_id);
vtr_tag2 = clib_net_to_host_u16 (si->sub.eth.inner_vlan_id);
if (out_config->push_bytes == 4)
{
out_config->tags[1].priority_cfi_and_id = vtr_tag1;
out_config->tags[1].type = push_outer_et;
}
else if (out_config->push_bytes == 8)
{
out_config->tags[0].priority_cfi_and_id = vtr_tag1;
out_config->tags[0].type = push_outer_et;
out_config->tags[1].priority_cfi_and_id = vtr_tag2;
out_config->tags[1].type = push_inner_et;
}
/* set the interface enable flags */
enable = (vtr_op != L2_VTR_DISABLED);
config->out_vtr_flag = (u8) enable;
l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_VTR, enable);
/* output vtr enable is checked explicitly in l2_output */
done:
return error;
}
/**
* Get vtag tag rewrite on the given interface.
* Return 1 if there is an error, 0 if ok
*/
u32
l2vtr_get (vlib_main_t * vlib_main, vnet_main_t * vnet_main, u32 sw_if_index, u32 * vtr_op, u32 * push_dot1q, /* ethertype of first pushed tag is dot1q/dot1ad */
u32 * vtr_tag1, /* first pushed tag */
u32 * vtr_tag2) /* second pushed tag */
{
vnet_hw_interface_t *hi;
u32 error = 0;
vtr_config_t *in_config;
if (!vtr_op || !push_dot1q || !vtr_tag1 || !vtr_tag2)
{
clib_warning ("invalid arguments");
error = VNET_API_ERROR_INVALID_ARGUMENT;
goto done;
}
*vtr_op = L2_VTR_DISABLED;
*vtr_tag1 = 0;
*vtr_tag2 = 0;
*push_dot1q = 0;
hi = vnet_get_sup_hw_interface_api_visible_or_null (vnet_main, sw_if_index);
if (!hi || (hi->hw_class_index != ethernet_hw_interface_class.index))
{
/* non-ethernet interface */
goto done;
}
if (sw_if_index >= vec_len (l2output_main.configs))
{
/* no specific config (return disabled) */
goto done;
}
/* Get the config for this interface */
in_config =
&(vec_elt_at_index (l2output_main.configs, sw_if_index)->input_vtr);
/* DISABLED */
if (in_config->push_and_pop_bytes == 0)
{
goto done;
}
/* find out vtr_op */
switch (in_config->pop_bytes)
{
case 0:
switch (in_config->push_bytes)
{
case 0:
/* DISABLED */
goto done;
case 4:
*vtr_op = L2_VTR_PUSH_1;
*vtr_tag1 =
clib_host_to_net_u16 (in_config->tags[1].priority_cfi_and_id);
*push_dot1q =
(ETHERNET_TYPE_VLAN ==
clib_host_to_net_u16 (in_config->tags[1].type));
break;
case 8:
*vtr_op = L2_VTR_PUSH_2;
*vtr_tag1 =
clib_host_to_net_u16 (in_config->tags[0].priority_cfi_and_id);
*vtr_tag2 =
clib_host_to_net_u16 (in_config->tags[1].priority_cfi_and_id);
*push_dot1q =
(ETHERNET_TYPE_VLAN ==
clib_host_to_net_u16 (in_config->tags[0].type));
break;
default:
clib_warning ("invalid push_bytes count: %d",
in_config->push_bytes);
error = VNET_API_ERROR_UNEXPECTED_INTF_STATE;
goto done;
}
break;
case 4:
switch (in_config->push_bytes)
{
case 0:
*vtr_op = L2_VTR_POP_1;
break;
case 4:
*vtr_op = L2_VTR_TRANSLATE_1_1;
*vtr_tag1 =
clib_host_to_net_u16 (in_config->tags[1].priority_cfi_and_id);
*push_dot1q =
(ETHERNET_TYPE_VLAN ==
clib_host_to_net_u16 (in_config->tags[1].type));
break;
case 8:
*vtr_op = L2_VTR_TRANSLATE_1_2;
*vtr_tag1 =
clib_host_to_net_u16 (in_config->tags[0].priority_cfi_and_id);
*vtr_tag2 =
clib_host_to_net_u16 (in_config->tags[1].priority_cfi_and_id);
*push_dot1q =
(ETHERNET_TYPE_VLAN ==
clib_host_to_net_u16 (in_config->tags[0].type));
break;
default:
clib_warning ("invalid push_bytes count: %d",
in_config->push_bytes);
error = VNET_API_ERROR_UNEXPECTED_INTF_STATE;
goto done;
}
break;
case 8:
switch (in_config->push_bytes)
{
case 0:
*vtr_op = L2_VTR_POP_2;
break;
case 4:
*vtr_op = L2_VTR_TRANSLATE_2_1;
*vtr_tag1 =
clib_host_to_net_u16 (in_config->tags[1].priority_cfi_and_id);
*push_dot1q =
(ETHERNET_TYPE_VLAN ==
clib_host_to_net_u16 (in_config->tags[1].type));
break;
case 8:
*vtr_op = L2_VTR_TRANSLATE_2_2;
*vtr_tag1 =
clib_host_to_net_u16 (in_config->tags[0].priority_cfi_and_id);
*vtr_tag2 =
clib_host_to_net_u16 (in_config->tags[1].priority_cfi_and_id);
*push_dot1q =
(ETHERNET_TYPE_VLAN ==
clib_host_to_net_u16 (in_config->tags[0].type));
break;
default:
clib_warning ("invalid push_bytes count: %d",
in_config->push_bytes);
error = VNET_API_ERROR_UNEXPECTED_INTF_STATE;
goto done;
}
break;
default:
clib_warning ("invalid pop_bytes count: %d", in_config->pop_bytes);
error = VNET_API_ERROR_UNEXPECTED_INTF_STATE;
goto done;
}
done:
return error;
}
/**
* Set subinterface vtr enable/disable.
* The CLI format is:
* set interface l2 tag-rewrite <interface> [disable | pop 1 | pop 2 | push {dot1q|dot1ad} <tag> [<tag>]]
*
* "push" can also be replaced by "translate-{1|2}-{1|2}"
*/
static clib_error_t *
int_l2_vtr (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
vnet_main_t *vnm = vnet_get_main ();
clib_error_t *error = 0;
u32 sw_if_index;
u32 vtr_op;
u32 push_dot1q = 0;
u32 tag1 = 0, tag2 = 0;
if (!unformat_user (input, unformat_vnet_sw_interface, vnm, &sw_if_index))
{
error = clib_error_return (0, "unknown interface `%U'",
format_unformat_error, input);
goto done;
}
vtr_op = L2_VTR_DISABLED;
if (unformat (input, "disable"))
{
vtr_op = L2_VTR_DISABLED;
}
else if (unformat (input, "pop 1"))
{
vtr_op = L2_VTR_POP_1;
}
else if (unformat (input, "pop 2"))
{
vtr_op = L2_VTR_POP_2;
}
else if (unformat (input, "push dot1q %d %d", &tag1, &tag2))
{
vtr_op = L2_VTR_PUSH_2;
push_dot1q = 1;
}
else if (unformat (input, "push dot1ad %d %d", &tag1, &tag2))
{
vtr_op = L2_VTR_PUSH_2;
}
else if (unformat (input, "push dot1q %d", &tag1))
{
vtr_op = L2_VTR_PUSH_1;
push_dot1q = 1;
}
else if (unformat (input, "push dot1ad %d", &tag1))
{
vtr_op = L2_VTR_PUSH_1;
}
else if (unformat (input, "translate 1-1 dot1q %d", &tag1))
{
vtr_op = L2_VTR_TRANSLATE_1_1;
push_dot1q = 1;
}
else if (unformat (input, "translate 1-1 dot1ad %d", &tag1))
{
vtr_op = L2_VTR_TRANSLATE_1_1;
}
else if (unformat (input, "translate 2-1 dot1q %d", &tag1))
{
vtr_op = L2_VTR_TRANSLATE_2_1;
push_dot1q = 1;
}
else if (unformat (input, "translate 2-1 dot1ad %d", &tag1))
{
vtr_op = L2_VTR_TRANSLATE_2_1;
}
else if (unformat (input, "translate 2-2 dot1q %d %d", &tag1, &tag2))
{
vtr_op = L2_VTR_TRANSLATE_2_2;
push_dot1q = 1;
}
else if (unformat (input, "translate 2-2 dot1ad %d %d", &tag1, &tag2))
{
vtr_op = L2_VTR_TRANSLATE_2_2;
}
else if (unformat (input, "translate 1-2 dot1q %d %d", &tag1, &tag2))
{
vtr_op = L2_VTR_TRANSLATE_1_2;
push_dot1q = 1;
}
else if (unformat (input, "translate 1-2 dot1ad %d %d", &tag1, &tag2))
{
vtr_op = L2_VTR_TRANSLATE_1_2;
}
else
{
error =
clib_error_return (0,
"expecting [disable | pop 1 | pop 2 | push {dot1q|dot1ah} <tag> [<tag>]\n"
" | translate {1|2}-{1|2} {dot1q|dot1ah} <tag> [<tag>]] but got `%U'",
format_unformat_error, input);
goto done;
}
if (l2vtr_configure (vm, vnm, sw_if_index, vtr_op, push_dot1q, tag1, tag2))
{
error =
clib_error_return (0,
"vlan tag rewrite is not compatible with interface");
goto done;
}
done:
return error;
}
/*?
* VLAN tag rewrite provides the ability to change the VLAN tags on a packet.
* Existing tags can be popped, new tags can be pushed, and existing tags can
* be swapped with new tags. The rewrite feature is attached to a subinterface
* as input and output operations. The input operation is explicitly configured.
* The output operation is the symmetric opposite and is automatically derived
* from the input operation.
*
* <b>POP:</b> For pop operations, the subinterface encapsulation (the vlan
* tags specified when it was created) must have at least the number of popped
* tags. e.g. the \"pop 2\" operation would be rejected on a single-vlan interface.
* The output tag-rewrite operation for pops is to push the specified number of
* vlan tags onto the packet. The pushed tag values are the ones in the
* subinterface encapsulation.
*
* <b>PUSH:</b> For push operations, the ethertype is also specified. The
* output tag-rewrite operation for pushes is to pop the same number of tags
* off the packet. If the packet doesn't have enough tags it is dropped.
*
*
* @cliexpar
* @parblock
* By default a subinterface has no tag-rewrite. To return a subinterface to
* this state use:
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 disable}
*
* To pop vlan tags off packets received from a subinterface, use:
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 pop 1}
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 pop 2}
*
* To push one or two vlan tags onto packets received from an interface, use:
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 push dot1q 100}
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 push dot1ad 100 150}
*
* Tags can also be translated, which is basically a combination of a pop and push.
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 translate 1-1 dot1ad 100}
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 translate 2-2 dot1ad 100 150}
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 translate 1-2 dot1q 100}
* @cliexcmd{set interface l2 tag-rewrite GigabitEthernet0/8/0.200 translate 2-1 dot1q 100 150}
*
* To display the VLAN Tag settings, show the associate bridge-domain:
* @cliexstart{show bridge-domain 200 detail}
* ID Index Learning U-Forwrd UU-Flood Flooding ARP-Term BVI-Intf
* 200 1 on on on on off N/A
*
* Interface Index SHG BVI VLAN-Tag-Rewrite
* GigabitEthernet0/8/0.200 5 0 - trans-1-1 dot1ad 100
* GigabitEthernet0/9/0.200 4 0 - none
* GigabitEthernet0/a/0.200 6 0 - none
* @cliexend
* @endparblock
?*/
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (int_l2_vtr_cli, static) = {
.path = "set interface l2 tag-rewrite",
.short_help = "set interface l2 tag-rewrite <interface> [disable | pop {1|2} | push {dot1q|dot1ad} <tag> <tag>]",
.function = int_l2_vtr,
};
/* *INDENT-ON* */
/**
* Get pbb tag rewrite on the given interface.
* Return 1 if there is an error, 0 if ok
*/
u32
l2pbb_get (vlib_main_t * vlib_main, vnet_main_t * vnet_main, u32 sw_if_index,
u32 * vtr_op, u16 * outer_tag, ethernet_header_t * eth_hdr,
u16 * b_vlanid, u32 * i_sid)
{
u32 error = 1;
ptr_config_t *in_config;
if (!vtr_op || !outer_tag || !b_vlanid || !i_sid)
{
clib_warning ("invalid arguments");
error = VNET_API_ERROR_INVALID_ARGUMENT;
goto done;
}
*vtr_op = L2_VTR_DISABLED;
*outer_tag = 0;
*b_vlanid = 0;
*i_sid = 0;
if (sw_if_index >= vec_len (l2output_main.configs))
{
/* no specific config (return disabled) */
goto done;
}
/* Get the config for this interface */
in_config =
&(vec_elt_at_index (l2output_main.configs, sw_if_index)->input_pbb_vtr);
if (in_config->push_and_pop_bytes == 0)
{
/* DISABLED */
goto done;
}
else
{
if (in_config->pop_bytes && in_config->push_bytes)
*vtr_op = L2_VTR_TRANSLATE_2_1;
else if (in_config->pop_bytes)
*vtr_op = L2_VTR_POP_2;
else if (in_config->push_bytes)
*vtr_op = L2_VTR_PUSH_2;
clib_memcpy_fast (ð_hdr->dst_address,
in_config->macs_tags.b_dst_address,
sizeof (eth_hdr->dst_address));
clib_memcpy_fast (ð_hdr->src_address,
in_config->macs_tags.b_src_address,
sizeof (eth_hdr->src_address));
*b_vlanid =
clib_host_to_net_u16 (in_config->macs_tags.priority_dei_id) & 0xFFF;
*i_sid =
clib_host_to_net_u32 (in_config->macs_tags.
priority_dei_uca_res_sid) & 0xFFFFF;
error = 0;
}
done:
return error;
}
/**
* Set subinterface pbb vtr enable/disable.
* The CLI format is:
* set interface l2 pbb-tag-rewrite <interface> [disable | pop | push | translate_pbb_stag <outer_tag> dmac <address> smac <address> s_id <nn> [b_vlanid <nn>]]
*/
static clib_error_t *
int_l2_pbb_vtr (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
vnet_main_t *vnm = vnet_get_main ();
clib_error_t *error = 0;
u32 sw_if_index, tmp;
u32 vtr_op = L2_VTR_DISABLED;
u32 outer_tag = 0;
u8 dmac[6];
u8 smac[6];
u8 dmac_set = 0, smac_set = 0;
u16 b_vlanid = 0;
u32 s_id = ~0;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat_user
(input, unformat_vnet_sw_interface, vnm, &sw_if_index))
;
else if (unformat (input, "disable"))
vtr_op = L2_VTR_DISABLED;
else if (vtr_op == L2_VTR_DISABLED && unformat (input, "pop"))
vtr_op = L2_VTR_POP_2;
else if (vtr_op == L2_VTR_DISABLED && unformat (input, "push"))
vtr_op = L2_VTR_PUSH_2;
else if (vtr_op == L2_VTR_DISABLED
&& unformat (input, "translate_pbb_stag %d", &outer_tag))
vtr_op = L2_VTR_TRANSLATE_2_1;
else if (unformat (input, "dmac %U", unformat_ethernet_address, dmac))
dmac_set = 1;
else if (unformat (input, "smac %U", unformat_ethernet_address, smac))
smac_set = 1;
else if (unformat (input, "b_vlanid %d", &tmp))
b_vlanid = tmp;
else if (unformat (input, "s_id %d", &s_id))
;
else
{
error = clib_error_return (0,
"expecting [disable | pop | push | translate_pbb_stag <outer_tag>\n"
"dmac <address> smac <address> s_id <nn> [b_vlanid <nn>]]");
goto done;
}
}
if ((vtr_op == L2_VTR_PUSH_2 || vtr_op == L2_VTR_TRANSLATE_2_1)
&& (!dmac_set || !smac_set || s_id == ~0))
{
error = clib_error_return (0,
"expecting dmac <address> smac <address> s_id <nn> [b_vlanid <nn>]");
goto done;
}
if (l2pbb_configure
(vm, vnm, sw_if_index, vtr_op, dmac, smac, b_vlanid, s_id, outer_tag))
{
error =
clib_error_return (0,
"pbb tag rewrite is not compatible with interface");
goto done;
}
done:
return error;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (int_l2_pbb_vtr_cli, static) = {
.path = "set interface l2 pbb-tag-rewrite",
.short_help = "set interface l2 pbb-tag-rewrite <interface> [disable | pop | push | translate_pbb_stag <outer_tag> dmac <address> smac <address> s_id <nn> [b_vlanid <nn>]]",
.function = int_l2_pbb_vtr,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/
|