Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/networking/tcpudp.c

    r2725 r3232  
    3030 */
    3131
     32//usage:#define tcpsvd_trivial_usage
     33//usage:       "[-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG"
     34/* with not-implemented options: */
     35/* //usage:    "[-hpEvv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] [-i DIR|-x CDB] [-t SEC] IP PORT PROG" */
     36//usage:#define tcpsvd_full_usage "\n\n"
     37//usage:       "Create TCP socket, bind to IP:PORT and listen\n"
     38//usage:       "for incoming connection. Run PROG for each connection.\n"
     39//usage:     "\n    IP      IP to listen on, 0 = all"
     40//usage:     "\n    PORT        Port to listen on"
     41//usage:     "\n    PROG ARGS   Program to run"
     42//usage:     "\n    -l NAME     Local hostname (else looks up local hostname in DNS)"
     43//usage:     "\n    -u USER[:GRP]   Change to user/group after bind"
     44//usage:     "\n    -c N        Handle up to N connections simultaneously"
     45//usage:     "\n    -b N        Allow a backlog of approximately N TCP SYNs"
     46//usage:     "\n    -C N[:MSG]  Allow only up to N connections from the same IP"
     47//usage:     "\n            New connections from this IP address are closed"
     48//usage:     "\n            immediately. MSG is written to the peer before close"
     49//usage:     "\n    -h      Look up peer's hostname"
     50//usage:     "\n    -E      Don't set up environment variables"
     51//usage:     "\n    -v      Verbose"
     52//usage:
     53//usage:#define udpsvd_trivial_usage
     54//usage:       "[-hEv] [-c N] [-u USER] [-l NAME] IP PORT PROG"
     55//usage:#define udpsvd_full_usage "\n\n"
     56//usage:       "Create UDP socket, bind to IP:PORT and wait\n"
     57//usage:       "for incoming packets. Run PROG for each packet,\n"
     58//usage:       "redirecting all further packets with same peer ip:port to it.\n"
     59//usage:     "\n    IP      IP to listen on, 0 = all"
     60//usage:     "\n    PORT        Port to listen on"
     61//usage:     "\n    PROG ARGS   Program to run"
     62//usage:     "\n    -l NAME     Local hostname (else looks up local hostname in DNS)"
     63//usage:     "\n    -u USER[:GRP]   Change to user/group after bind"
     64//usage:     "\n    -c N        Handle up to N connections simultaneously"
     65//usage:     "\n    -h      Look up peer's hostname"
     66//usage:     "\n    -E      Don't set up environment variables"
     67//usage:     "\n    -v      Verbose"
     68
    3269#include "libbb.h"
    3370
     
    388425         * (otherwise we can move socket to fd #0 only if bind succeeds) */
    389426        close(0);
    390         set_nport(localp, htons(local_port));
     427        set_nport(&localp->u.sa, htons(local_port));
    391428        xmove_fd(xsocket(localp->u.sa.sa_family, SOCK_DGRAM, 0), 0);
    392429        setsockopt_reuseaddr(0); /* crucial */
Note: See TracChangeset for help on using the changeset viewer.