ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 07 26 00 00 04 b8 08 06 00 00 00 52 25 af | .PNG........IHDR...&.........R%. |
0020 | 0d 00 00 0c 24 69 43 43 50 49 43 43 20 50 72 6f 66 69 6c 65 00 00 48 89 95 57 07 54 93 c9 16 9e | ....$iCCPICC.Profile..H..W.T.... |
0040 | bf 24 21 21 a1 05 22 20 25 f4 26 4a 91 2e bd 46 10 90 2a d8 08 49 20 a1 c4 98 10 54 ec e8 a2 02 | .$!!..".%.&J...F..*..I.....T.... |
0060 | 6b 41 45 04 2b ba 2a a2 e8 8a 14 59 6c d8 50 59 14 7b 5f 14 51 51 d6 c5 82 0d 35 6f 92 00 ba ee | kAE.+.*....Yl.PY.{_.QQ....5o.... |
0080 | 2b e7 dd 73 e6 9f ef bf 73 ef 9d ef 4e 3b 33 00 a8 47 b3 45 a2 2c 54 03 80 6c 61 8e 38 26 34 80 | +..s....s...N;3..G.E.,T..la.8&4. |
00a0 | 39 29 29 99 49 7a 04 10 c0 00 24 60 05 54 d9 1c 89 c8 3f 3a 3a 02 40 19 aa ff 2e ef 6e 40 6b 28 | 9)).Iz....$`.T....?::.@.....n@k( |
00c0 | 57 ed e5 b1 fe d9 fe 5f 45 93 cb 93 70 00 40 a2 21 4e e5 4a 38 d9 10 1f 06 00 77 e5 88 c4 39 00 | W......_E...p.@.!N.J8.....w...9. |
00e0 | 10 7a a1 de 6c 56 8e 08 62 22 64 09 b4 c5 90 20 c4 e6 72 9c ae c4 ee 72 9c aa c4 11 0a 9b b8 98 | .z..lV..b"d.......r....r........ |
0100 | 40 88 53 00 50 a1 b2 d9 e2 74 00 d4 e4 bc 98 b9 9c 74 18 47 ad 18 62 07 21 57 20 84 b8 19 62 1f | @.S.P....t.......t.G..b.!W....b. |
0120 | 0e 9f cd 85 f8 33 c4 a3 b2 b3 67 40 ac 6e 0d b1 75 ea 77 71 d2 ff 16 33 75 38 26 9b 9d 3e 8c 95 | .....3....g@.n..u.wq...3u8&..>.. |
0140 | b9 28 44 25 48 20 11 65 b1 e7 fc 9f c3 f1 bf 25 3b 4b 3a d4 87 19 2c 54 be 38 2c 46 9e b3 7c dc | .(D%H..e.......%;K:...,T.8,F..|. |
0160 | 32 67 84 cb 31 15 e2 56 61 6a 64 14 c4 5a 10 5f 13 70 15 f6 72 fc 84 2f 0d 8b 1f b4 ff c0 91 04 | 2g..1..Vajd..Z._.p..r../........ |
0180 | c2 31 83 33 0d 50 2a 97 1d 14 0e b1 01 c4 a6 d2 cc 78 ff 41 ec c3 16 2b 7c a1 3d 9a 9c c7 8f 4b | .1.3.P*..........x.A...+|.=....K |
01a0 | 54 c6 47 85 e2 19 31 83 f1 d1 3c 61 56 64 c4 60 9c 62 3e 8f 35 84 2b 79 92 e0 d8 21 9b 34 41 08 | T.G...1...<aVd.`.b>.5.+y...!.4A. |
01c0 | 0b 62 38 87 68 a3 20 87 15 37 18 b3 35 57 90 10 09 b1 1a c4 f7 24 99 b1 e1 83 be cf f3 f8 81 91 | .b8.h....7..5W.......$.......... |
01e0 | c3 7d 49 63 e4 9c e1 9c 63 20 5b 32 94 0b 66 9e 26 0e 89 51 da 63 ae 7c 01 2b 72 50 1f 91 c3 8f | .}Ic....c.[2..f.&..Q.c.|.+rP.... |
0200 | 0b 53 fa 62 d3 38 6c 05 07 5d 88 33 78 92 49 11 43 7c b8 bc a0 60 25 1f 2c 9f 27 8c 1f e4 89 95 | .S.b.8l..].3x.I.C|...`%.,.'..... |
0220 | 88 72 02 62 06 ed 77 8a b2 a2 07 ed b1 66 5e 56 a8 5c 6f 0a 71 bb 24 37 76 c8 b7 2f 07 2e 36 65 | .r.b..w......f^V.\o.q.$7v../..6e |
0240 | 2e 38 c8 60 8f 8f 56 f6 8b 6b 8b 72 a2 e3 94 dc 70 26 88 00 81 20 08 30 81 14 96 54 30 03 64 00 | .8.`..V..k.r....p&.....0...T0.d. |
0260 | 41 7b 6f 43 2f 18 6a 09 01 6c 20 06 e9 80 07 ec 07 35 43 1e 89 8a 16 21 fc c6 82 3c f0 27 44 3c | A{oC/.j..l.......5C....!...<.'D< |
0280 | 20 19 f6 0b 50 b4 f2 40 2e d4 7f 19 d6 2a bf f6 20 4d d1 9a ab f0 c8 04 4f 20 ce c6 f5 71 1f dc | ....P..@.....*...M......O....q.. |
02a0 | 0b 8f 80 5f 3f 58 9c 70 77 dc 63 c8 8f a9 3e d4 2b 31 98 18 44 0c 23 86 10 6d a6 0b f2 c5 3f c4 | ..._?X.pw.c...>.+1..D.#..m....?. |
02c0 |
@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
/*
* mpls_fib.h: The Label/MPLS FIB
*
* Copyright (c) 2012 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.
*/
#ifndef __MPLS_FIB_TABLE_H__
#define __MPLS_FIB_TABLE_H__
#include <vnet/vnet.h>
#include <vnet/mpls/mpls.h>
#include <vnet/fib/fib_types.h>
#include <vnet/dpo/dpo.h>
#include <vnet/mpls/mpls.h>
#include <vnet/fib/fib_table.h>
#define MPLS_FIB_DEFAULT_TABLE_ID 0
/**
* Type exposure is to allow the DP fast/inlined access
*/
#define MPLS_FIB_KEY_SIZE 21
#define MPLS_FIB_DB_SIZE (1 << (MPLS_FIB_KEY_SIZE-1))
/**
* There are no options for controlling the MPLS flow hash
*/
#define MPLS_FLOW_HASH_DEFAULT 0
typedef struct mpls_fib_t_
{
/**
* Required for pool_get_aligned
*/
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0);
/**
* A hash table of entries. 21 bit key
* Hash table for reduced memory footprint
*/
uword * mf_entries;
/**
* The load-balance indices keyed by 21 bit label+eos bit.
* A flat array for maximum lookup performace.
*/
index_t mf_lbs[MPLS_FIB_DB_SIZE];
} mpls_fib_t;
static inline mpls_fib_t*
mpls_fib_get (fib_node_index_t index)
{
return (pool_elt_at_index(mpls_main.mpls_fibs, index));
}
extern u32 mpls_fib_table_find_or_create_and_lock(u32 table_id,
fib_source_t src);
extern u32 mpls_fib_table_create_and_lock(fib_source_t src);
// extern mpls_fib_t * mpls_fib_find(u32 table_id);
extern u32 mpls_fib_index_from_table_id(u32 table_id);
extern u8 *format_mpls_fib_table_name(u8 * s, va_list * args);
extern fib_node_index_t mpls_fib_table_entry_add_from_ip_fib_entry (
u32 table_id,
mpls_label_t label,
mpls_eos_bit_t eos,
fib_node_index_t fib_entry_index);
extern fib_node_index_t mpls_fib_table_lookup(const mpls_fib_t *mf,
mpls_label_t label,
mpls_eos_bit_t eos);
extern void mpls_fib_table_entry_remove(mpls_fib_t *mf,
mpls_label_t label,
mpls_eos_bit_t eos);
extern void mpls_fib_table_entry_insert(mpls_fib_t *mf,
mpls_label_t label,
mpls_eos_bit_t eos,
fib_node_index_t fei);
extern void mpls_fib_table_destroy(u32 fib_index);
extern void mpls_fib_forwarding_table_update(mpls_fib_t *mf,
mpls_label_t label,
mpls_eos_bit_t eos,
const dpo_id_t *dpo);
extern void mpls_fib_forwarding_table_reset(mpls_fib_t *mf,
mpls_label_t label,
mpls_eos_bit_t eos);
/**
* @brief Walk all entries in a FIB table
* N.B: This is NOT safe to deletes. If you need to delete walk the whole
* table and store elements in a vector, then delete the elements
*/
extern void mpls_fib_table_walk(mpls_fib_t *fib,
fib_table_walk_fn_t fn,
void *ctx);
extern u8 *format_mpls_fib_table_memory(u8 * s, va_list * args);
/**
* @brief
* Lookup a label and EOS bit in the MPLS_FIB table to retrieve the
* load-balance index to be used for packet forwarding.
*/
static inline index_t
mpls_fib_table_forwarding_lookup (u32 mpls_fib_index,
const mpls_unicast_header_t *hdr)
{
mpls_label_t label;
mpls_fib_t *mf;
u32 key;
label = clib_net_to_host_u32(hdr->label_exp_s_ttl);
key = (vnet_mpls_uc_get_label(label) << 1) | vnet_mpls_uc_get_s(label);
mf = mpls_fib_get(mpls_fib_index);
return (mf->mf_lbs[key]);
}
static inline u32
mpls_fib_table_get_index_for_sw_if_index (u32 sw_if_index)
{
mpls_main_t *mm = &mpls_main;
ASSERT(vec_len(mm->fib_index_by_sw_if_index) > sw_if_index);
return (mm->fib_index_by_sw_if_index[sw_if_index]);
}
#endif
|