summaryrefslogtreecommitdiffstats
path: root/test/vpp_igmp.py
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-04-03 11:20:06 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-04-11 01:19:56 +0000
commit7c91007e1e13b56a29236bd076891709eaa21754 (patch)
treee6d78635a3b53f6db4b0bfa563d98254c464da6f /test/vpp_igmp.py
parent10dc2eabd6e8a266405aef270a819794a3ddd333 (diff)
Make the loss / delay sim available as an output feature
Add binary api and debug cli support. Rewrite for speed: enqueue vlib_buffer_t's to the wheel, instead of memcpy'ing data. Quad-loop the output feature / x-connect (interior) node. Prefetch wheel entries in the input node. Save packet-generator-based unit-test setup in extras/nsim. Simple config example: set nsim delay 20 ms bandwidth 1 gbit packet-size 1024 nsim output-feature enable-disable GigabitEthernet3/0/0 Change-Id: I852a32d4eb596e7e2aa1d9b30bf3b53525e39fd1 Signed-off-by: Dave Barach <dave@barachs.net>c
Diffstat (limited to 'test/vpp_igmp.py')
0 files changed, 0 insertions, 0 deletions
redoc */ .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 */ }
# Syslog protocol support {#syslog_doc}

VPP provides [RFC5424](https://tools.ietf.org/html/rfc5424) syslog protocol
logging, which is used to transport event messages across network. VPP
currently suports UDP transport based on
[RFC5426](https://tools.ietf.org/html/rfc5426).

The syslog message has the following format:
* header
* structured data
* free-form message

The header contains, priority, version, timestamp, hostname, application,
process id and message id. It is followed by structured data, which  provides
a mechanism to express event data in easily parsable format. Structured data
can contain zero, one or multiple structured data elements. Structured data
element contains name-value pairs. Structured data can by followed by free-form
message.

Following example explains how to use the internal APIs to genrate syslog
message:
```{.c}
   #include <vnet/syslog/syslog.h>

   ...

   syslog_msg_t syslog_msg;

   /* Check if syslog logging is enabled */
   if (!syslog_is_enabled ())
     return;

   /* Severity filer test */
   if (syslog_severity_filter_block (severity))
     return;

   /* Initialize syslog message header */
   syslog_msg_init (&syslog_msg, facility, severity, "NAT", "SADD");

   /* Create structured data element */
   syslog_msg_sd_init (&syslog_msg, "nsess");
   /* Add structured data element parameters (name-value pairs) */
   syslog_msg_add_sd_param (&syslog_msg, "SSUBIX", "%d", ssubix);
   syslog_msg_add_sd_param (&syslog_msg, "SVLAN", "%d", svlan);
   syslog_msg_add_sd_param (&syslog_msg, "IATYP", "IPv4");
   syslog_msg_add_sd_param (&syslog_msg, "ISADDR", "%U",
                            format_ip4_address, isaddr);
   syslog_msg_add_sd_param (&syslog_msg, "ISPORT", "%d", isport);
   syslog_msg_add_sd_param (&syslog_msg, "XATYP", "IPv4");
   syslog_msg_add_sd_param (&syslog_msg, "XSADDR", "%U",
                            format_ip4_address, xsaddr);
   syslog_msg_add_sd_param (&syslog_msg, "XSPORT", "%d", xsport);
   syslog_msg_add_sd_param (&syslog_msg, "PROTO", "%d", proto);

   /* Send syslog message */
   syslog_msg_send (&syslog_msg);
```

Example above produces following syslog message:
   <134>1 2018-11-12T11:25:30.252715Z 172.16.4.1 NAT 5901 SADD [nsess SSUBIX="0" SVLAN="0" IATYP="IPv4" ISADDR="172.16.1.2" ISPORT="6303" XATYP="IPv4" XSADDR="10.0.0.3" XSPORT="16253" PROTO="6"]

To add free-form message use:
```{.c}
   syslog_msg_add_msg (&syslog_msg, "event log entry");
```