diff options
author | Stefan Berger <stefanb@us.ibm.com> | 2010-04-26 13:50:40 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@us.ibm.com> | 2010-04-26 13:50:40 -0400 |
commit | 5c7c755f50bf82d96b5c25aa622bd9c1eec45103 (patch) | |
tree | 0ac4ce5a57b895563a78e61fdd91c19b6c1e23ff /tests/nwfilterxml2xmlin | |
parent | Starts dnsmasq from libvirtd with --dhcp-hostsfile option (diff) | |
download | libvirt-5c7c755f50bf82d96b5c25aa622bd9c1eec45103.tar.gz libvirt-5c7c755f50bf82d96b5c25aa622bd9c1eec45103.tar.bz2 libvirt-5c7c755f50bf82d96b5c25aa622bd9c1eec45103.zip |
nwfilter: enable hex number inputs in filter XML
With this patch I want to enable hex number inputs in the filter XML. A
number that was entered as hex is also printed as hex unless a string
representing the meaning can be found.
I am also extending the schema and adding a test case. A problem with
the DSCP value is fixed on the way as well.
Changes from V1 to V2:
- using asHex boolean in all printf type of functions to select the
output format in hex or decimal format
Diffstat (limited to 'tests/nwfilterxml2xmlin')
-rw-r--r-- | tests/nwfilterxml2xmlin/hex-data-test.xml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/nwfilterxml2xmlin/hex-data-test.xml b/tests/nwfilterxml2xmlin/hex-data-test.xml new file mode 100644 index 000000000..af26a92ae --- /dev/null +++ b/tests/nwfilterxml2xmlin/hex-data-test.xml @@ -0,0 +1,56 @@ +<filter name='testcase'> + <uuid>01a992d2-f8c8-7c27-f69b-ab0a9d377379</uuid> + + <rule action='accept' direction='in'> + <mac protocolid='0x1234'/> + </rule> + + <rule action='accept' direction='out'> + <ip srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:ff' + dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:ff' + srcipaddr='10.1.2.3' srcipmask='255.255.255.255' + dstipaddr='10.1.2.3' dstipmask='255.255.255.255' + protocol='udp' + srcportstart='0x123' srcportend='0x234' + dstportstart='0x3456' dstportend='0x4567' + dscp='0x32'/> + </rule> + + <rule action='accept' direction='out'> + <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' + dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' + srcipaddr='::10.1.2.3' srcipmask='22' + dstipaddr='::10.1.2.3' + dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' + protocol='tcp' + srcportstart='0x111' srcportend='400' + dstportstart='0x3333' dstportend='65535'/> + </rule> + + <rule action='accept' direction='out'> + <arp srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:ff' + dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:ff' + hwtype='0x12' + protocoltype='0x56' + opcode='Request' + arpsrcmacaddr='1:2:3:4:5:6' + arpdstmacaddr='a:b:c:d:e:f'/> + </rule> + + <rule action='accept' direction='out'> + <udp srcmacaddr='1:2:3:4:5:6' + dstipaddr='10.1.2.3' dstipmask='255.255.255.255' + dscp='0x22' + srcportstart='0x123' srcportend='400' + dstportstart='0x234' dstportend='0x444'/> + </rule> + + <rule action='accept' direction='in'> + <tcp-ipv6 srcmacaddr='1:2:3:4:5:6' + srcipaddr='a:b:c::' srcipmask='128' + dscp='0x40' + srcportstart='0x20' srcportend='0x21' + dstportstart='0x100' dstportend='0x1111'/> + </rule> + +</filter> |