comparison src/g23m-fad/tcpip/rnet/rnet_ip_addr.h @ 174:90eb61ecd093

src/g23m-fad: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 12 Oct 2016 05:40:46 +0000
parents
children
comparison
equal deleted inserted replaced
173:bf64d785238a 174:90eb61ecd093
1 /**
2 * @file ipv4/rnet_ip_addr.h
3 *
4 * Riviera NET.
5 *
6 * IPv4 address related structures.
7 * See the Readme.txt file.
8 *
9 * @author Vincent Oberle (v-oberle@ti.com)
10 * @version 0.1
11 */
12
13 /*
14 * History:
15 *
16 * Date Author Modification
17 * --------------------------------------------------
18 * 01/25/2002 Vincent Oberle Create
19 *
20 * (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved
21 */
22
23 #ifndef __RNET_IP_ADDR_H_
24 #define __RNET_IP_ADDR_H_
25
26 #include "rv_general.h"
27
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32
33 /**
34 * @name IPv4 address.
35 *
36 * T_RNET_IP_ADDR is the IPv4 address type.
37 *
38 * The RNET_IP_ADDR_ANY value corresponds to any IP address.
39 * The RNET_IP4_ADDR allows easy creation of IP addresses.
40 */
41 /*@{*/
42 typedef UINT32 T_RNET_IP_ADDR;
43
44 #define RNET_IP_ADDR_ANY 0
45
46 #define RNET_IP4_ADDR(ipaddr, a,b,c,d) { \
47 ipaddr = ((UINT32)(a & 0xff) << 24) | ((UINT32)(b & 0xff) << 16) | \
48 ((UINT32)(c & 0xff) << 8) | (UINT32)(d & 0xff); \
49 }
50 /*@}*/
51
52 /**
53 * Port. 16 bits.
54 */
55 typedef UINT16 T_RNET_PORT;
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61 #endif /* __RNET_IP_ADDR_H_ */
62