kalasag.org

kalasag.org

Git

This blob has been accessed 2,607 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. #include <features.h>
  46.  
  47. __BEGIN_DECLS struct tcphdr {
  48.     u_int16_t source;
  49.     u_int16_t dest;
  50.     u_int32_t seq;
  51.     u_int32_t ack_seq;
  52. #if __BYTE_ORDER == __LITTLE_ENDIAN
  53.     u_int16_t res1:4;
  54.     u_int16_t doff:4;
  55.     u_int16_t fin:1;
  56.     u_int16_t syn:1;
  57.     u_int16_t rst:1;
  58.     u_int16_t psh:1;
  59.     u_int16_t ack:1;
  60.     u_int16_t urg:1;
  61.     u_int16_t res2:2;
  62. #elif __BYTE_ORDER == __BIG_ENDIAN
  63.     u_int16_t doff:4;
  64.     u_int16_t res1:4;
  65.     u_int16_t res2:2;
  66.     u_int16_t urg:1;
  67.     u_int16_t ack:1;
  68.     u_int16_t psh:1;
  69.     u_int16_t rst:1;
  70.     u_int16_t syn:1;
  71.     u_int16_t fin:1;
  72. #else
  73. #error  "Adjust your <bits/endian.h> defines"
  74. #endif
  75.     u_int16_t window;
  76.     u_int16_t check;
  77.     u_int16_t urg_ptr;
  78. };
  79.  
  80. #endif                          /* tcp.h */
  81.  
  82.  
  83.  
  84. #ifndef __NETINET_IP_H
  85. #define __NETINET_IP_H 1
  86.  
  87. __BEGIN_DECLS struct timestamp {
  88.     u_int8_t len;
  89.     u_int8_t ptr;
  90. #if __BYTE_ORDER == __LITTLE_ENDIAN
  91.     u_int8_t flags:4;
  92.     u_int8_t overflow:4;
  93. #elif __BYTE_ORDER == __BIG_ENDIAN
  94.     u_int8_t overflow:4;
  95.     u_int8_t flags:4;
  96. #else
  97. #error  "Please fix <bytesex.h>"
  98. #endif
  99.     u_int32_t data[9];
  100. };
  101.  
  102. struct ip_options {
  103.     u_int32_t faddr;            /* Saved first hop address */
  104.     u_int8_t optlen;
  105.     u_int8_t srr;
  106.     u_int8_t rr;
  107.     u_int8_t ts;
  108.     u_int8_t is_setbyuser:1;    /* Set by setsockopt?                   */
  109.     u_int8_t is_data:1;         /* Options in __data, rather than skb   */
  110.     u_int8_t is_strictroute:1;  /* Strict source route           */
  111.     u_int8_t srr_is_hit:1;      /* Packet destination addr was our one  */
  112.     u_int8_t is_changed:1;      /* IP checksum more not valid           */
  113.     u_int8_t rr_needaddr:1;     /* Need to record addr of outgoing dev  */
  114.     u_int8_t ts_needtime:1;     /* Need to record timestamp             */
  115.     u_int8_t ts_needaddr:1;     /* Need to record addr of outgoing dev  */
  116.     u_int8_t router_alert;
  117.     u_int8_t __pad1;
  118.     u_int8_t __pad2;
  119.     u_int8_t __data[0];
  120. };
  121.  
  122. struct iphdr {
  123. #if __BYTE_ORDER == __LITTLE_ENDIAN
  124.     u_int8_t ihl:4;
  125.     u_int8_t version:4;
  126. #elif __BYTE_ORDER == __BIG_ENDIAN
  127.     u_int8_t version:4;
  128.     u_int8_t ihl:4;
  129. #else
  130. #error  "Please fix <bytesex.h>"
  131. #endif
  132.     u_int8_t tos;
  133.     u_int16_t tot_len;
  134.     u_int16_t id;
  135.     u_int16_t frag_off;
  136.     u_int8_t ttl;
  137.     u_int8_t protocol;
  138.     u_int16_t check;
  139.     u_int32_t saddr;
  140.     u_int32_t daddr;
  141.     /*The options start here. */
  142. };
  143.  
  144. #endif
  145.  
  146. #ifndef __NETINET_UDP_H
  147. #define __NETINET_UDP_H    1
  148.  
  149. __BEGIN_DECLS
  150. /* UDP header as specified by RFC 768, August 1980. */
  151.     struct udphdr {
  152.     u_int16_t source;
  153.     u_int16_t dest;
  154.     u_int16_t len;
  155.     u_int16_t check;
  156. };
  157.  
  158. __END_DECLS
  159. #endif                          /* netinet/udp.h */
  160.  
filedropkalasag.git-1c9f013.tar.bz2 new
20.95 KB
1 download
filedropkalasag.git-1c9f013.zip
25.81 KB
1 download
filedropkalasag.git-3ca3612.tar.bz2
20.80 KB
1 download
filedropkalasag.git-3ca3612.zip
25.66 KB
1 download
filedropkalasag.git-2ffeaa6.tar.bz2
20.80 KB
1 download
filedropkalasag.git-2ffeaa6.zip
25.65 KB
1 download
filedropkalasag.git-2834a11.tar.bz2
20.84 KB
1 download
filedropkalasag.git-2834a11.zip
25.72 KB
1 download
filedropkalasag.git-afd7b31.tar.bz2
20.84 KB
1 download
filedropkalasag.git-afd7b31.zip
25.71 KB
1 download
filedropkalasag.git-97c89e1.tar.bz2
20.82 KB
1 download
filedropkalasag.git-97c89e1.zip
25.68 KB
1 download
filedropkalasag.git-1141d13.tar.bz2
20.65 KB
1 download
filedropkalasag.git-1141d13.zip
25.37 KB
1 download
filedropkalasag.git-ee3c17b.tar.bz2
20.65 KB
1 download
filedropkalasag.git-ee3c17b.zip
25.34 KB
1 download
filedropkalasag.git-4032c54.tar.bz2
20.63 KB
1 download
filedropkalasag.git-4032c54.zip
25.13 KB
1 download
filedropkalasag.git-e51a2a6.tar.bz2
20.65 KB
306 downloads
filedropkalasag.git-e51a2a6.zip
25.13 KB
190 downloads
filedropkalasag.git-599c93a.tar.bz2
20.63 KB
296 downloads
filedropkalasag.git-599c93a.zip
25.11 KB
1,521 downloads
filedropkalasag.git-acdc640.tar.bz2
20.63 KB
287 downloads
filedropkalasag.git-acdc640.zip
25.10 KB
207 downloads