Lines Matching refs:dscp
1 /* Shared library add-on to iptables for DSCP
11 * For a list of DSCP codepoints see
12 * http://www.iana.org/assignments/dscp-registry
30 "DSCP match v%s options\n"
31 "[!] --dscp value Match DSCP codepoint with numerical value\n"
34 "[!] --dscp-class name Match the DiffServ class. This value may\n"
43 { "dscp", 1, 0, 'F' },
44 { "dscp-class", 1, 0, 'G' },
51 unsigned int dscp;
53 if (string_to_number(s, 0, 255, &dscp) == -1)
55 "Invalid dscp `%s'\n", s);
57 if (dscp > IPT_DSCP_MAX)
59 "DSCP `%d` out of range\n", dscp);
61 dinfo->dscp = (u_int8_t )dscp;
69 unsigned int dscp = class_to_dscp(s);
72 dinfo->dscp = (u_int8_t)dscp;
89 "DSCP match: Only use --dscp ONCE!");
100 "DSCP match: Only use --dscp-class ONCE!");
120 "DSCP match: Parameter --dscp is required");
124 print_dscp(u_int8_t dscp, int invert, int numeric)
129 printf("0x%02x ", dscp);
140 printf("DSCP match ");
141 print_dscp(dinfo->dscp, dinfo->invert, numeric);
151 printf("--dscp ");
152 print_dscp(dinfo->dscp, dinfo->invert, 1);
155 static struct iptables_match dscp = {
157 .name = "dscp",
171 register_match(&dscp);