From 30def04dd4b6bc98f6adeb386131912f1c34a1c0 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 29 Oct 2010 10:09:58 +0200 Subject: [PATCH] oping: Add alias for the "Voice Admit" DSCP. --- src/mans/oping.pod | 7 +++++++ src/oping.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/mans/oping.pod b/src/mans/oping.pod index 3a7c8ac..dba318c 100644 --- a/src/mans/oping.pod +++ b/src/mans/oping.pod @@ -93,6 +93,13 @@ Selects the I (EF) per-hop behavior, as defined in I3246>. This PHB is characterised by low delay, low loss and low jitter, i.e. high priority traffic. +=item B + +Selects the I (VA) per-hop behavior, as defined in +I5865>. This traffic class is meant for I (VoIP) +traffic which uses I (CAC) for reserving network +capacity. + =item BII

Selects one of 12Edifferentiated services code points (DSCPs), which are diff --git a/src/oping.c b/src/oping.c index 5b13a1f..776dc0b 100644 --- a/src/oping.c +++ b/src/oping.c @@ -280,6 +280,8 @@ static void usage_qos_exit (const char *arg, int status) /* {{{ */ " be Best Effort (BE, default PHB).\n" " ef Expedited Forwarding (EF) PHB group (RFC 3246).\n" " (low delay, low loss, low jitter)\n" + " va Voice Admit (VA) DSCP (RFC 5865).\n" + " (capacity-admitted traffic)\n" " af[1-4][1-3] Assured Forwarding (AF) PHB group (RFC 2597).\n" " For example: \"af12\" (class 1, precedence 2)\n" " cs[0-7] Class Selector (CS) PHB group (RFC 2474).\n" @@ -319,6 +321,9 @@ static int set_opt_send_qos (const char *opt) /* {{{ */ /* - Expedited Forwarding (EF, RFC 3246) */ else if (strcasecmp ("ef", opt) == 0) opt_send_qos = 0xB8; /* == 0x2E << 2 */ + /* - Voice Admit (VA, RFC 5865) */ + else if (strcasecmp ("va", opt) == 0) + opt_send_qos = 0xB0; /* == 0x2D << 2 */ /* - Assured Forwarding (AF, RFC 2597) */ else if ((strncasecmp ("af", opt, strlen ("af")) == 0) && (strlen (opt) == 4)) @@ -410,6 +415,7 @@ static char *format_qos (uint8_t qos, char *buffer, size_t buffer_size) /* {{{ * { case 0x00: dscp_str = "be"; break; case 0x2e: dscp_str = "ef"; break; + case 0x2d: dscp_str = "va"; break; case 0x0a: dscp_str = "af11"; break; case 0x0c: dscp_str = "af12"; break; case 0x0e: dscp_str = "af13"; break; -- 2.11.0