Ignore:
Timestamp:
May 22, 2019, 4:09:18 PM (5 years ago)
Author:
coas-nagasima
Message:

ファイルディスクリプタ処理を更新

File:
1 moved

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/ntshell/src/fdtable.h

    r386 r387  
    3838#define SOCKET_STUB_H
    3939
    40 struct addrinfo {
    41         int ai_flags;
    42         int ai_family;
    43         int ai_socktype;
    44         int ai_protocol;
    45         socklen_t ai_addrlen;
    46         struct sockaddr *ai_addr;
    47         char *ai_canonname;
    48         struct addrinfo *ai_next;
    49 };
    50 
    51 typedef uint16_t in_port_t;
    52 typedef uint32_t in_addr_t;
    53 struct in_addr { in_addr_t s_addr; };
    54 
    55 struct sockaddr_in {
    56         sa_family_t sin_family;
    57         in_port_t sin_port;
    58         struct in_addr sin_addr;
    59         uint8_t sin_zero[8];
    60 };
    61 
    62 struct in6_addr
    63 {
    64         union {
    65                 uint8_t __s6_addr[16];
    66                 uint16_t __s6_addr16[8];
    67                 uint32_t __s6_addr32[4];
    68         } __in6_union;
    69 };
    70 //#define s6_addr __in6_union.__s6_addr
    71 //#define s6_addr16 __in6_union.__s6_addr16
    72 //#define s6_addr32 __in6_union.__s6_addr32
    73 
    74 struct sockaddr_in6
    75 {
    76         sa_family_t     sin6_family;
    77         in_port_t       sin6_port;
    78         uint32_t        sin6_flowinfo;
    79         struct in6_addr sin6_addr;
    80         uint32_t        sin6_scope_id;
    81 };
    82 
    83 typedef struct socket_t {
    84         int family;
    85         int type;
    86         int protocol;
    87         int cepid;
    88         int repid;
    89         int backlog;
    90         unsigned int flags;
    91         union {
    92                 struct sockaddr_in laddr4;
    93                 struct sockaddr_in6 laddr6;
    94         };
    95         union {
    96                 struct sockaddr_in raddr4;
    97                 struct sockaddr_in6 raddr6;
    98         };
    99         int buf_size;
    100         unsigned char *buf;
    101         void *input;
    102         int len;
    103 } socket_t;
    104 
    105 struct SHELL_DIR {
    106         FATFS_DIR dir;
    107         struct dirent dirent;
    108 };
    109 
    11040typedef const struct io_type_s IO_TYPE;
    11141
     
    13161        int (*ioctl)(struct SHELL_FILE *, int, void *);
    13262        bool_t (*readable)(struct SHELL_FILE *);
     63        bool_t (*writable)(struct SHELL_FILE *);
    13364        void (*delete)(struct SHELL_FILE *);
    13465};
Note: See TracChangeset for help on using the changeset viewer.