"Fossies" - the Fresh Open Source Software Archive

Member "tcpflow-1.6.1/src/wifipcap/udp.h" (19 Feb 2021, 3900 Bytes) of package /linux/misc/tcpflow-1.6.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "udp.h" see the Fossies "Dox" file reference documentation.

    1 /* @(#) $Header: /home/cvs/wifitools/wifipcap/udp.h,v 1.1.1.1 2006/12/14 01:22:11 jpang Exp $ (LBL) */
    2 /*
    3  * Copyright (c) 1982, 1986, 1993
    4  *  The Regents of the University of California.  All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  * 3. All advertising materials mentioning features or use of this software
   15  *    must display the following acknowledgement:
   16  *  This product includes software developed by the University of
   17  *  California, Berkeley and its contributors.
   18  * 4. Neither the name of the University nor the names of its contributors
   19  *    may be used to endorse or promote products derived from this software
   20  *    without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   32  * SUCH DAMAGE.
   33  *
   34  *  @(#)udp.h   8.1 (Berkeley) 6/10/93
   35  */
   36 
   37 /*
   38  * Udp protocol header.
   39  * Per RFC 768, September, 1981.
   40  */
   41 struct udphdr {
   42     u_int16_t   uh_sport;       /* source port */
   43     u_int16_t   uh_dport;       /* destination port */
   44     u_int16_t   uh_ulen;        /* udp length */
   45     u_int16_t   uh_sum;         /* udp checksum */
   46 };
   47 
   48 #define TFTP_PORT 69        /*XXX*/
   49 #define KERBEROS_PORT 88    /*XXX*/
   50 #define SUNRPC_PORT 111     /*XXX*/
   51 #define SNMP_PORT 161       /*XXX*/
   52 #define NTP_PORT 123        /*XXX*/
   53 #define SNMPTRAP_PORT 162   /*XXX*/
   54 #define ISAKMP_PORT 500     /*XXX*/
   55 #define SYSLOG_PORT 514         /* rfc3164 */
   56 #define TIMED_PORT 525      /*XXX*/
   57 #define RIP_PORT 520        /*XXX*/
   58 #define LDP_PORT 646
   59 #define AODV_PORT 654       /*XXX*/
   60 #define KERBEROS_SEC_PORT 750   /*XXX*/
   61 #define L2TP_PORT 1701      /*XXX*/
   62 #define SIP_PORT 5060
   63 #define ISAKMP_PORT_NATT  4500  /* rfc3948 */
   64 #define ISAKMP_PORT_USER1 7500  /*XXX - nonstandard*/
   65 #define ISAKMP_PORT_USER2 8500  /*XXX - nonstandard*/
   66 #define RX_PORT_LOW 7000    /*XXX*/
   67 #define RX_PORT_HIGH 7009   /*XXX*/
   68 #define NETBIOS_NS_PORT   137
   69 #define NETBIOS_DGRAM_PORT   138
   70 #define CISCO_AUTORP_PORT 496   /*XXX*/
   71 #define RADIUS_PORT 1645
   72 #define RADIUS_NEW_PORT 1812
   73 #define RADIUS_ACCOUNTING_PORT 1646
   74 #define RADIUS_NEW_ACCOUNTING_PORT 1813
   75 #define HSRP_PORT 1985      /*XXX*/
   76 #define LMP_PORT                701 /* rfc4204 */
   77 #define LWRES_PORT      921
   78 #define ZEPHYR_SRV_PORT     2103
   79 #define ZEPHYR_CLT_PORT     2104
   80 #define MPLS_LSP_PING_PORT      3503 /* draft-ietf-mpls-lsp-ping-02.txt */
   81 #define BFD_CONTROL_PORT        3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
   82 #define BFD_ECHO_PORT           3785 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
   83 
   84 #ifdef INET6
   85 #define RIPNG_PORT 521      /*XXX*/
   86 #define DHCP6_SERV_PORT 546 /*XXX*/
   87 #define DHCP6_CLI_PORT 547  /*XXX*/
   88 #endif
   89 
   90 /* Jeff: endian-fixed udp header */
   91 struct udp_hdr_t {
   92     u_int16_t   sport;      /* source port */
   93     u_int16_t   dport;      /* destination port */
   94     u_int16_t   len;        /* udp length */
   95     u_int16_t   cksum;      /* udp checksum */
   96 };