VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/tcpip.h@ 103914

Last change on this file since 103914 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1/* $Id: tcpip.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * NAT - TCP/IP (declarations/defines).
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28/*
29 * This code is based on:
30 *
31 * Copyright (c) 1982, 1986, 1993
32 * The Regents of the University of California. All rights reserved.
33 *
34 * Redistribution and use in source and binary forms, with or without
35 * modification, are permitted provided that the following conditions
36 * are met:
37 * 1. Redistributions of source code must retain the above copyright
38 * notice, this list of conditions and the following disclaimer.
39 * 2. Redistributions in binary form must reproduce the above copyright
40 * notice, this list of conditions and the following disclaimer in the
41 * documentation and/or other materials provided with the distribution.
42 * 3. Neither the name of the University nor the names of its contributors
43 * may be used to endorse or promote products derived from this software
44 * without specific prior written permission.
45 *
46 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
47 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
50 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
52 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 * SUCH DAMAGE.
57 *
58 * @(#)tcpip.h 8.1 (Berkeley) 6/10/93
59 * tcpip.h,v 1.3 1994/08/21 05:27:40 paul Exp
60 */
61
62#ifndef _TCPIP_H_
63#define _TCPIP_H_
64
65/*
66 * Tcp+ip header, after ip options removed.
67 */
68struct tcpiphdr
69{
70 struct ipovly ti_i; /* overlaid ip structure */
71 struct tcphdr ti_t; /* tcp header */
72};
73AssertCompileSize(struct tcpiphdr, 40);
74#define ti_next ti_i.ih_next
75#define ti_prev ti_i.ih_prev
76#define ti_x1 ti_i.ih_x1
77#define ti_pr ti_i.ih_pr
78#define ti_len ti_i.ih_len
79#define ti_src ti_i.ih_src
80#define ti_dst ti_i.ih_dst
81#define ti_sport ti_t.th_sport
82#define ti_dport ti_t.th_dport
83#define ti_seq ti_t.th_seq
84#define ti_ack ti_t.th_ack
85#define ti_x2 ti_t.th_x2
86#define ti_off ti_t.th_off
87#define ti_flags ti_t.th_flags
88#define ti_win ti_t.th_win
89#define ti_sum ti_t.th_sum
90#define ti_urp ti_t.th_urp
91
92/*
93 * Just a clean way to get to the first byte
94 * of the packet
95 */
96struct tcpiphdr_2
97{
98 struct tcpiphdr dummy;
99 char first_char;
100};
101
102#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette