1. 12 11月, 2010 3 次提交
    • L
      Do a better job of validating IP and MAC addresses in network.rng · 76654409
      Laine Stump 提交于
      IP addresses and MAC addresses had been defined in the RNG simply as
      <text/> meaning that, according to the RNG, any string could go in
      there. Of course the C parsing code does a much better job of
      validating, but we may as well have this describing the contents
      accurately (even though it's currently only used during "make check").
      76654409
    • L
      re-indent network.rng following structural change · 5983f2d2
      Laine Stump 提交于
      This commit is whitespace changes only, do avoid obscuring actual code
      changes.
      5983f2d2
    • L
      Put network.rng contents inside <grammar> for uniformity with other RNGs · 3d10d348
      Laine Stump 提交于
      All the other RNG files in libvirt are enclosed within <grammar>. This
      commit makes the syntactical changes necessary to make network.rng fit
      that pattern. (This is the first step in adding some data type
      definitions to network.rng for more exact validation of IP and MAC
      addresses).
      
      Formatting changes (indentation) will be done in a subsequent commit,
      so that actual changes to the code won't be obscured by whitespace.
      3d10d348
  2. 02 3月, 2010 1 次提交
    • J
      maint: convert leading TABs in *.rng files to equivalent spaces · aa7847d3
      Jim Meyering 提交于
      * docs/schemas/capability.rng: Likewise.
      * docs/schemas/network.rng: Likewise.
      * docs/schemas/nodedev.rng: Likewise.
      * docs/schemas/storagepool.rng: Likewise.
      * docs/schemas/storagevol.rng: Likewise.
      Use these commands:
      t=$'\t'
      git ls-files | grep '\.rng$' | xargs grep -lE "^ *$t" \
        | xargs perl -MText::Tabs -ni -le \
          '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
      aa7847d3
  3. 28 10月, 2009 1 次提交
    • P
      Add support for an external TFTP boot server · 936565c7
      Paolo Bonzini 提交于
      This patch adds an optional attribute to the <bootp> tag, that
      allows to specify a TFTP server address other than the address of
      the DHCP server itself.
      
      This can be used to forward the BOOTP settings of the host down to the
      guest.  This is something that configurations such as Xen's default
      network achieve naturally, but must be done manually for NAT.
      
      * docs/formatnetwork.html.in: Document new attribute.
      * docs/schemas/network.rng: Add it to schema.
      * src/conf/network_conf.h: Add it to struct.
      * src/conf/network_conf.c: Add it to parser and pretty printer.
      * src/network/bridge_driver.c: Put it in the dnsmasq command line.
      * tests/networkxml2xmlin/netboot-proxy-network.xml
        tests/networkxml2xmlout/netboot-proxy-network.xml
        tests/networkxml2xmltest.c: add new tests
      936565c7
  4. 16 10月, 2009 1 次提交
  5. 23 9月, 2009 1 次提交
    • P
      network: add 'bootp' and 'tftp' config · 738ee810
      Paolo Bonzini 提交于
      Currently, libvirtd will start a dnsmasq process for the virtual
      network, but (aside from killing the dnsmasq process and replacing it),
      there's no way to define tftp boot options.
      
      This change introduces the appropriate tags to the dhcp configuration:
      
       <network>
         <name>default</name>
         <bridge name="virbr%d" />
         <forward/>
         <ip address="192.168.122.1" netmask="255.255.255.0">
           <tftp root="/var/lib/tftproot" />
           <dhcp>
             <range start="192.168.122.2" end="192.168.122.254" />
             <bootp file="pxeboot.img"/>
           </dhcp>
         </ip>
       </network>
      
      When the attributes are present, these are passed to the
      arguments to dnsmasq:
      
       dnsmasq [...] --enable-tftp --tftp-root /srv/tftp --dhcp-boot pxeboot.img
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
                            from <tftp />                     from <bootp />
      
      At present, only local tftp servers are supported (ie, dnsmasq runs as
      the tftp server), but we could improve this in future by adding a
      server= attribute.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      
      2009-09-21  Paolo Bonzini  <pbonzini@redhat.com>
                  Jeremy Kerr  <jk@ozlabs.org>
      
      	* docs/formatnetwork.html.in: Document new tags.
      	* docs/formatnetwork.html: Regenerate.
      	* docs/schemas/network.rng: Update.
      	* src/network_conf.c (virNetworkDefFree): Free new fields.
      	(virNetworkDHCPRangeDefParseXML): Parse <bootp>.
      	(virNetworkIPParseXML): New, parsing <dhcp> and <tftp>.
      	(virNetworkDefParseXML): Use virNetworkIPParseXML instead of
      	virNetworkDHCPRangeDefParseXML.
      	(virNetworkDefFormat): Pretty print new fields.
      	* src/network_conf.h (struct _virNetworkDef): Add netboot fields.
      	* src/network_driver.c (networkBuildDnsmasqArgv): Add
      	TFTP and BOOTP arguments.
      
      	* tests/Makefile.am (EXTRA_DIST): Add networkschemadata.
      	* tests/networkschematest: Look in networkschemadata.
      	* tests/networkschemadata/netboot-network.xml: New.
      738ee810
  6. 02 7月, 2009 1 次提交
    • D
      Fix some missing parts in network code and schemas · 1e4434d6
      Daniel Veillard 提交于
      * docs/schemas/network.rng: fix the network schemas to match
        new accepted elements, patch by Satoru SATOH
      * src/network_conf.c: fix network driver to save the domain name
        in XML if present, patch by Satoru SATOH
      * AUTHORS: adding Satoru SATOH
      Daniel
      1e4434d6
  7. 27 1月, 2009 1 次提交
  8. 29 3月, 2008 1 次提交
  9. 24 7月, 2007 1 次提交