43 |
|
static inline void WriteMacInt16(uint32 addr, uint32 w) {*(uint16 *)addr = htons(w);} |
44 |
|
static inline void WriteMacInt8(uint32 addr, uint32 b) {*(uint8 *)addr = b;} |
45 |
|
static inline uint8 *Mac2HostAddr(uint32 addr) {return (uint8 *)addr;} |
46 |
+ |
static inline void *Mac_memset(uint32 addr, int c, size_t n) {return memset(Mac2HostAddr(addr), c, n);} |
47 |
+ |
static inline void *Mac2Host_memcpy(void *dest, uint32 src, size_t n) {return memcpy(dest, Mac2HostAddr(src), n);} |
48 |
+ |
static inline void *Host2Mac_memcpy(uint32 dest, const void *src, size_t n) {return memcpy(Mac2HostAddr(dest), src, n);} |
49 |
+ |
static inline void *Mac2Mac_memcpy(uint32 dest, uint32 src, size_t n) {return memcpy(Mac2HostAddr(dest), Mac2HostAddr(src), n);} |
50 |
|
|
51 |
|
|
52 |
|
/* |