• Niels Möller's avatar
    (open_ports): Replaced by three new functions, to · 2a8623c3
    Niels Möller authored
    support multiple listen ports.
    (open_port): Look up a port using getaddrinfo, and bind one or
    more sockets.
    (open_interface): Bind all appropriate ports for a given
    interface.
    (open_all_ports): Open all configured ports on all interfaces.
    (class lshd_interface): New class.
    (class lshd_config): Use queues to handle multiple ports and
    interfaces.
    (parse_interface): New function.
    (main_argp_parser): Handle --interface option. Accept multiple -p
    options.
    (lshd_config_handler): Likewise. Added default port logic.
    
    Rev: src/lshd.c:1.182
    2a8623c3
lshd.c 24.5 KB