1 /******************************************************************************
2 * Copyright (c) 2004, 2008 IBM Corporation
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
10 * IBM Corporation - initial implementation
11 *****************************************************************************/
13 /************************ DEFINITIONS & DECLARATIONS *********************/
16 #include <sys/socket.h>
18 /****************************** LOCAL VARIABLES **************************/
20 /****************************** IMPLEMENTATION ***************************/
23 * TCP: Handles TCP-packets according to Receive-handle diagram.
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)
30 int8_t handle_tcp(uint8_t * tcp_packet, int32_t packetsize)
36 * NET: This function handles situation when "Destination unreachable"
37 * ICMP-error occurs during sending TCP-packet.
39 * @param err_code Error Code (e.g. "Host unreachable")
40 * @param packet original TCP-packet
41 * @param packetsize length of the packet
44 void handle_tcp_dun(uint8_t * tcp_packet, uint32_t packetsize, uint8_t err_code)