Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 #ifndef _INOUT_H
00030 #define _INOUT_H
00031 
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif                          
00036 #include <arpa/nameser.h>
00037 #ifdef __cplusplus
00038 }
00039 #endif                          
00040 
00041 #define GETCHAR(s, cp) { \
00042         (s) = *(cp)++; \
00043 }
00044 
00045 #define PUTCHAR(s, cp) { \
00046         *(cp)++ = (s); \
00047 }
00048 
00049 #define GETLONGLONG(l, cp) { \
00050         (l) = *(cp)++ << 8; \
00051         (l) |= *(cp)++; (l) <<= 8; \
00052         (l) |= *(cp)++; (l) <<= 8; \
00053         (l) |= *(cp)++; (l) <<= 8; \
00054         (l) |= *(cp)++; (l) <<= 8; \
00055         (l) |= *(cp)++; (l) <<= 8; \
00056         (l) |= *(cp)++; (l) <<= 8; \
00057         (l) |= *(cp)++; \
00058 }
00059 
00060 
00061 
00062 
00063 #define PUTLONGLONG(l, cp) { \
00064         (cp)[7] = l; \
00065         (cp)[6] = (l >>= 8); \
00066         (cp)[5] = (l >>= 8); \
00067         (cp)[4] = (l >>= 8); \
00068         (cp)[3] = (l >>= 8); \
00069         (cp)[2] = (l >>= 8); \
00070         (cp)[1] = (l >>= 8); \
00071         (cp)[0] = l >> 8; \
00072         (cp) += 8; \
00073 }
00074 
00075 
00076 #endif