1 /*---------------------------------------------------------------------------* 2 Project: Net 3 File: net_types.h 4 Description: Common Network Structure 5 6 Copyright (C) 2010 Nintendo. All rights reserved. 7 8 These coded instructions, statements, and computer programs contain 9 proprietary information of Nintendo of America Inc. and/or Nintendo 10 Company Ltd., and are protected by Federal copyright law. They may 11 not be disclosed to third parties or copied or duplicated in any form, 12 in whole or in part, without the prior written consent of Nintendo. 13 14 Author: Ajit Dhumale 15 *---------------------------------------------------------------------------*/ 16 #ifndef __NET_TYPES_H__ 17 #define __NET_TYPES_H__ 18 19 /* Socket API return codes */ 20 #define SO_SUCCESS (0) 21 #define SO_ENOBUFS (1) 22 #define SO_ETIMEDOUT (2) 23 #define SO_EISCONN (3) 24 #define SO_EOPNOTSUPP (4) 25 #define SO_ECONNABORTED (5) 26 #define SO_EWOULDBLOCK (6) 27 #define SO_ECONNREFUSED (7) 28 #define SO_ECONNRESET (8) 29 #define SO_ENOTCONN (9) 30 #define SO_EALREADY (10) 31 #define SO_EINVAL (11) 32 #define SO_EMSGSIZE (12) 33 #define SO_EPIPE (13) 34 #define SO_EDESTADDRREQ (14) 35 #define SO_ESHUTDOWN (15) 36 #define SO_ENOPROTOOPT (16) 37 #define SO_EHAVEOOB (17) 38 #define SO_ENOMEM (18) 39 #define SO_EADDRNOTAVAIL (19) 40 #define SO_EADDRINUSE (20) 41 #define SO_EAFNOSUPPORT (21) 42 #define SO_EINPROGRESS (22) 43 #define SO_ELOWER (23) 44 #define SO_ENOTSOCK (24) 45 #define SO_EIEIO (27) 46 #define SO_ETOOMANYREFS (28) 47 #define SO_EFAULT (29) 48 #define SO_ENETUNREACH (30) 49 #define SO_EPROTONOSUPPORT (31) 50 #define SO_EPROTOTYPE (32) 51 52 #define SO_ERROR (41) /* Generic error */ 53 #define SO_ENOLIBRM (42) 54 #define SO_ELIBNOTREADY (43) 55 #define SO_EBUSY (44) 56 #define SO_EUNKNOWN (45) 57 #define SO_EAPIERROR (46) 58 #define SO_ERANGEINVALID (47) 59 #define SO_ENORESOURCES (48) 60 #define SO_EBADFD (49) 61 #define SO_EABORTED (50) 62 #define SO_EMFILE (51) 63 64 #define SO_ICMP_EDESTIN (100) 65 #define SO_ICMP_ESOURCEQ (101) 66 #define SO_ICMP_EREDIR (102) 67 #define SO_ICMP_ETIMEX (103) 68 #define SO_ICMP_EPARAM (104) 69 70 struct timeval 71 { 72 long tv_sec; 73 long tv_usec; 74 }; 75 76 typedef unsigned long fd_mask; 77 78 typedef struct fd_set { 79 fd_mask fd_bits; 80 } fd_set; 81 82 #endif 83