Changeset 46c20c8 in mainline for uspace/lib/c/include/net/inet.h
- Timestamp:
- 2010-11-26T20:08:10Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45df59a
- Parents:
- fb150d78 (diff), ffdd2b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
uspace/lib/c/include/net/inet.h (moved) (moved from uspace/lib/libc/arch/ia32/include/istate.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/inet.h
rfb150d78 r46c20c8 1 1 /* 2 * Copyright (c) 20 10 Jiri Svoboda2 * Copyright (c) 2009 Lukas Mejdrech 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup debug 30 * @{ 31 */ 32 /** @file 29 /** @addtogroup libc 30 * @{ 33 31 */ 34 32 35 #ifndef LIBC_ia32__ISTATE_H_ 36 #define LIBC_ia32__ISTATE_H_ 33 /** @file 34 * Internet common definitions. 35 */ 36 37 #ifndef LIBC_INET_H_ 38 #define LIBC_INET_H_ 37 39 38 40 #include <sys/types.h> 41 #include <byteorder.h> 39 42 40 /** Interrupt context. 41 * 42 * This is a copy of the kernel definition with which it must be kept in sync. 43 /** Type definition of the socket address. 44 * @see sockaddr 43 45 */ 44 typedef struct istate { 45 uint32_t eax; 46 uint32_t ecx; 47 uint32_t edx; 48 uint32_t ebp; 46 typedef struct sockaddr sockaddr_t; 49 47 50 uint32_t gs; 51 uint32_t fs; 52 uint32_t es; 53 uint32_t ds;48 /** Type definition of the address information. 49 * @see addrinfo 50 */ 51 typedef struct addrinfo addrinfo_t; 54 52 55 uint32_t error_word; 56 uint32_t eip; 57 uint32_t cs; 58 uint32_t eflags; 59 uint32_t stack[]; 60 } istate_t; 53 /** Socket address. */ 54 struct sockaddr { 55 /** Address family. @see socket.h */ 56 uint16_t sa_family; 57 /** 14 byte protocol address. */ 58 uint8_t sa_data[14]; 59 }; 61 60 62 static inline uintptr_t istate_get_pc(istate_t *istate) 63 { 64 return istate->eip; 65 } 66 67 static inline uintptr_t istate_get_fp(istate_t *istate) 68 { 69 return istate->ebp; 70 } 61 extern int inet_ntop(uint16_t, const uint8_t *, char *, size_t); 62 extern int inet_pton(uint16_t, const char *, uint8_t *); 71 63 72 64 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
