These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / SLOF / clients / net-snk / app / netlib / tcp.c
1 /******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation
3  * All rights reserved.
4  * This program and the accompanying materials
5  * are made available under the terms of the BSD License
6  * which accompanies this distribution, and is available at
7  * http://www.opensource.org/licenses/bsd-license.php
8  *
9  * Contributors:
10  *     IBM Corporation - initial implementation
11  *****************************************************************************/
12
13 /************************ DEFINITIONS & DECLARATIONS *********************/
14
15 #include <tcp.h>
16 #include <sys/socket.h>
17
18 /****************************** LOCAL VARIABLES **************************/
19
20 /****************************** IMPLEMENTATION ***************************/
21
22 /**
23  * TCP: Handles TCP-packets according to Receive-handle diagram.
24  *
25  * @param  tcp_packet TCP-packet to be handled
26  * @param  packetsize Length of the packet
27  * @return            ZERO - packet handled successfully;
28  *                    NON ZERO - packet was not handled (e.g. bad format)
29  */
30 int8_t handle_tcp(uint8_t * tcp_packet, int32_t packetsize)
31 {
32         return -1;
33 }
34
35 /**
36  * NET: This function handles situation when "Destination unreachable"
37  *      ICMP-error occurs during sending TCP-packet.
38  *
39  * @param  err_code   Error Code (e.g. "Host unreachable")
40  * @param  packet     original TCP-packet
41  * @param  packetsize length of the packet
42  * @see               handle_icmp
43  */
44 void handle_tcp_dun(uint8_t * tcp_packet, uint32_t packetsize, uint8_t err_code)
45 {
46 }