root / arduino-1.0 / libraries / Ethernet / util.h @ 58d82c77
History | View | Annotate | Download (330 Bytes)
1 | 58d82c77 | Tom Mullins | #ifndef UTIL_H
|
---|---|---|---|
2 | #define UTIL_H
|
||
3 | |||
4 | #define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) ) |
||
5 | #define ntohs(x) htons(x)
|
||
6 | |||
7 | #define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ |
||
8 | ((x)<< 8 & 0x00FF0000UL) | \ |
||
9 | ((x)>> 8 & 0x0000FF00UL) | \ |
||
10 | ((x)>>24 & 0x000000FFUL) ) |
||
11 | #define ntohl(x) htonl(x)
|
||
12 | |||
13 | #endif |