kalasag.org

kalasag.org

Git

This blob has been accessed 2 times via Git panel.

  1. /* Versions of Linux are not consistent in how the TCP/UDP/IP headers
  2. * defined. This file contains the Linux/BSD headers from RedHat 5.0 and
  3. * should clear up compile problems. CHR
  4. */
  5.  
  6.  
  7. /*
  8.  * Copyright (c) 1982, 1986, 1993
  9.  *      The Regents of the University of California.  All rights reserved.
  10.  *
  11.  * Redistribution and use in source and binary forms, with or without
  12.  * modification, are permitted provided that the following conditions
  13.  * are met:
  14.  * 1. Redistributions of source code must retain the above copyright
  15.  *    notice, this list of conditions and the following disclaimer.
  16.  * 2. Redistributions in binary form must reproduce the above copyright
  17.  *    notice, this list of conditions and the following disclaimer in the
  18.  *    documentation and/or other materials provided with the distribution.
  19.  * 3. All advertising materials mentioning features or use of this software
  20.  *    must display the following acknowledgement:
  21.  *      This product includes software developed by the University of
  22.  *      California, Berkeley and its contributors.
  23.  * 4. Neither the name of the University nor the names of its contributors
  24.  *    may be used to endorse or promote products derived from this software
  25.  *    without specific prior written permission.
  26.  *
  27.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  28.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  30.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  31.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  32.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  33.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  34.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  35.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  36.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  37.  * SUCH DAMAGE.
  38.  *
  39.  *      @(#)tcp.h       8.1 (Berkeley) 6/10/93
  40.  */
  41.  
  42. #ifndef _NETINET_TCP_H
  43. #define _NETINET_TCP_H  1
  44.  
  45. #ifndef __BEGIN_DECLS
  46. #  ifdef __cplusplus
  47. #    define __BEGIN_DECLS  extern "C" {
  48. #    define __END_DECLS    }
  49. #  else
  50. #    define __BEGIN_DECLS
  51. #    define __END_DECLS
  52. #  endif
  53. #endif
  54.  
  55. __BEGIN_DECLS struct tcphdr {
  56.     u_int16_t source;
  57.     u_int16_t dest;
  58.     u_int32_t seq;
  59.     u_int32_t ack_seq;
  60. #if __BYTE_ORDER == __LITTLE_ENDIAN
  61.     u_int16_t res1:4;
  62.     u_int16_t doff:4;
  63.     u_int16_t fin:1;
  64.     u_int16_t syn:1;
  65.     u_int16_t rst:1;
  66.     u_int16_t psh:1;
  67.     u_int16_t ack:1;
  68.     u_int16_t urg:1;
  69.     u_int16_t res2:2;
  70. #elif __BYTE_ORDER == __BIG_ENDIAN
  71.     u_int16_t doff:4;
  72.     u_int16_t res1:4;
  73.     u_int16_t res2:2;
  74.     u_int16_t urg:1;
  75.     u_int16_t ack:1;
  76.     u_int16_t psh:1;
  77.     u_int16_t rst:1;
  78.     u_int16_t syn:1;
  79.     u_int16_t fin:1;
  80. #else
  81. #error  "Adjust your <bits/endian.h> defines"
  82. #endif
  83.     u_int16_t window;
  84.     u_int16_t check;
  85.     u_int16_t urg_ptr;
  86. };
  87.  
  88. #endif                          /* tcp.h */
  89.  
  90.  
  91.  
  92. #ifndef __NETINET_IP_H
  93. #define __NETINET_IP_H 1
  94.  
  95. __BEGIN_DECLS struct timestamp {
  96.     u_int8_t len;
  97.     u_int8_t ptr;
  98. #if __BYTE_ORDER == __LITTLE_ENDIAN
  99.     u_int8_t flags:4;
  100.     u_int8_t overflow:4;
  101. #elif __BYTE_ORDER == __BIG_ENDIAN
  102.     u_int8_t overflow:4;
  103.     u_int8_t flags:4;
  104. #else
  105. #error  "Please fix <bytesex.h>"
  106. #endif
  107.     u_int32_t data[9];
  108. };
  109.  
  110. struct ip_options {
  111.     u_int32_t faddr;            /* Saved first hop address */
  112.     u_int8_t optlen;
  113.     u_int8_t srr;
  114.     u_int8_t rr;
  115.     u_int8_t ts;
  116.     u_int8_t is_setbyuser:1;    /* Set by setsockopt?                   */
  117.     u_int8_t is_data:1;         /* Options in __data, rather than skb   */
  118.     u_int8_t is_strictroute:1;  /* Strict source route           */
  119.     u_int8_t srr_is_hit:1;      /* Packet destination addr was our one  */
  120.     u_int8_t is_changed:1;      /* IP checksum more not valid           */
  121.     u_int8_t rr_needaddr:1;     /* Need to record addr of outgoing dev  */
  122.     u_int8_t ts_needtime:1;     /* Need to record timestamp             */
  123.     u_int8_t ts_needaddr:1;     /* Need to record addr of outgoing dev  */
  124.     u_int8_t router_alert;
  125.     u_int8_t __pad1;
  126.     u_int8_t __pad2;
  127.     u_int8_t __data[0];
  128. };
  129.  
  130. struct iphdr {
  131. #if __BYTE_ORDER == __LITTLE_ENDIAN
  132.     u_int8_t ihl:4;
  133.     u_int8_t version:4;
  134. #elif __BYTE_ORDER == __BIG_ENDIAN
  135.     u_int8_t version:4;
  136.     u_int8_t ihl:4;
  137. #else
  138. #error  "Please fix <bytesex.h>"
  139. #endif
  140.     u_int8_t tos;
  141.     u_int16_t tot_len;
  142.     u_int16_t id;
  143.     u_int16_t frag_off;
  144.     u_int8_t ttl;
  145.     u_int8_t protocol;
  146.     u_int16_t check;
  147.     u_int32_t saddr;
  148.     u_int32_t daddr;
  149.     /*The options start here. */
  150. };
  151.  
  152. #endif
  153.  
  154. #ifndef __NETINET_UDP_H
  155. #define __NETINET_UDP_H    1
  156.  
  157. __BEGIN_DECLS
  158. /* UDP header as specified by RFC 768, August 1980. */
  159.     struct udphdr {
  160.     u_int16_t source;
  161.     u_int16_t dest;
  162.     u_int16_t len;
  163.     u_int16_t check;
  164. };
  165.  
  166. __END_DECLS
  167. #endif                          /* netinet/udp.h */
  168.  
filedropkalasag.git-8eed43a.tar.bz2 new
21.31 KB
2 downloads
filedropkalasag.git-8eed43a.zip
26.47 KB
1 download
filedropkalasag.git-83beb57.tar.bz2
21.32 KB
2 downloads
filedropkalasag.git-83beb57.zip
26.49 KB
1 download
filedropkalasag.git-89d9746.tar.bz2
21.25 KB
3 downloads
filedropkalasag.git-89d9746.zip
26.41 KB
2 downloads
filedropkalasag.git-a1e8b2b.tar.bz2
21.14 KB
2 downloads
filedropkalasag.git-a1e8b2b.zip
26.30 KB
1 download
filedropkalasag.git-8c3a288.tar.bz2
21.20 KB
3 downloads
filedropkalasag.git-8c3a288.zip
26.46 KB
2 downloads
filedropkalasag.git-1c9f013.tar.bz2
20.95 KB
131 downloads
filedropkalasag.git-1c9f013.zip
25.81 KB
76 downloads
filedropkalasag.git-3ca3612.tar.bz2
20.80 KB
34 downloads
filedropkalasag.git-3ca3612.zip
25.66 KB
19 downloads
filedropkalasag.git-2ffeaa6.tar.bz2
20.80 KB
36 downloads
filedropkalasag.git-2ffeaa6.zip
25.65 KB
90 downloads
filedropkalasag.git-2834a11.tar.bz2
20.84 KB
139 downloads
filedropkalasag.git-2834a11.zip
25.72 KB
18 downloads
filedropkalasag.git-afd7b31.tar.bz2
20.84 KB
119 downloads
filedropkalasag.git-afd7b31.zip
25.71 KB
98 downloads
filedropkalasag.git-97c89e1.tar.bz2
20.82 KB
116 downloads
filedropkalasag.git-97c89e1.zip
25.68 KB
96 downloads
filedropkalasag.git-1141d13.tar.bz2
20.65 KB
122 downloads
filedropkalasag.git-1141d13.zip
25.37 KB
82 downloads
filedropkalasag.git-ee3c17b.tar.bz2
20.65 KB
113 downloads
filedropkalasag.git-ee3c17b.zip
25.34 KB
24 downloads
filedropkalasag.git-4032c54.tar.bz2
20.63 KB
32 downloads
filedropkalasag.git-4032c54.zip
25.13 KB
87 downloads
filedropkalasag.git-e51a2a6.tar.bz2
20.65 KB
108 downloads
filedropkalasag.git-e51a2a6.zip
25.13 KB
19 downloads
filedropkalasag.git-599c93a.tar.bz2
20.63 KB
104 downloads
filedropkalasag.git-599c93a.zip
25.11 KB
1,612 downloads
filedropkalasag.git-acdc640.tar.bz2
20.63 KB
105 downloads
filedropkalasag.git-acdc640.zip
25.10 KB
14 downloads