summaryrefslogtreecommitdiff
path: root/nameser.h
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-10 22:21:37 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-10 22:21:37 +0100
commitfa2faabe6139e9d4b2596b3989318d965075a197 (patch)
tree070c2930a647f6091a805f989e37cb7e4e50bb1a /nameser.h
parentc56f25c54b87b3edaced56578721c72d7ca9795d (diff)
downloadtcpdump-fa2faabe6139e9d4b2596b3989318d965075a197.tar.gz
Remove unused macros in nameser.h
Diffstat (limited to 'nameser.h')
-rw-r--r--nameser.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/nameser.h b/nameser.h
index 4e08c7b9..b430c9db 100644
--- a/nameser.h
+++ b/nameser.h
@@ -252,49 +252,4 @@ struct rrec {
char *r_data; /* pointer to data */
};
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- * We also assume that a "uint16_t" holds 2 "chars"
- * and that a "uint32_t" holds 4 "chars".
- *
- * These macros demonstrate the property of C whereby it can be
- * portable or it can be elegant but never both.
- */
-#define GETSHORT(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (s) = ((uint16_t)t_cp[0] << 8) | (uint16_t)t_cp[1]; \
- (cp) += 2; \
-}
-
-#define GETLONG(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (l) = (((uint32_t)t_cp[0]) << 24) \
- | (((uint32_t)t_cp[1]) << 16) \
- | (((uint32_t)t_cp[2]) << 8) \
- | (((uint32_t)t_cp[3])); \
- (cp) += 4; \
-}
-
-#define PUTSHORT(s, cp) { \
- register uint16_t t_s = (uint16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += 2; \
-}
-
-/*
- * Warning: PUTLONG --no-longer-- destroys its first argument. if you
- * were depending on this "feature", you will lose.
- */
-#define PUTLONG(l, cp) { \
- register uint32_t t_l = (uint32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += 4; \
-}
-
#endif /* !_NAMESER_H_ */