• L
    convert net_init_socket() to NetClientOptions · bef8e8fe
    Laszlo Ersek 提交于
    I "reverse engineered" the following permissions between the -socket
    sub-options:
    
                 fd  listen  connect  mcast  udp | localaddr
      fd         x   .       .        .      .   | .
      listen     .   x       .        .      .   | .
      connect    .   .       x        .      .   | .
      mcast      .   .       .        x      .   | x
      udp        .   .       .        .      x   | x
      -------------------------------------------+
      localaddr  .   .       .        x      x     x
    
    I transformed the code accordingly. The real fix would be to embed "fd",
    "listen", "connect", "mcast" and "udp" in a separate union. However
    OptsVisitor's enum parser only supports the type=XXX QemuOpt instance as
    union discriminator.
    Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
    Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    bef8e8fe
socket.c 18.4 KB