netatalk 4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
byteorder.h File Reference
`#include <arpa/inet.h>`

Go to the source code of this file.

## Macros
#define | CAREFUL_ALIGNMENT 1
#define | CVAL(buf, pos)
#define | CVAL_NC(buf, pos)
#define | PVAL(buf, pos)
#define | SCVAL(buf, pos, val)
#define | SVAL(buf, pos)
#define | SVAL_NC(buf, pos)
#define | IVAL(buf, pos)
#define | IVAL_NC(buf, pos)
#define | LVAL(buf, pos)
#define | LVAL_NC(buf, pos)
#define | SVALS(buf, pos)
#define | SVALS_NC(buf, pos)
#define | IVALS(buf, pos)
#define | IVALS_NC(buf, pos)
#define | LVALS(buf, pos)
#define | LVALS_NC(buf, pos)
#define | SSVAL(buf, pos, val)
#define | SIVAL(buf, pos, val)
#define | SLVAL(buf, pos, val)
#define | SSVALS(buf, pos, val)
#define | SIVALS(buf, pos, val)
#define | SLVALS(buf, pos, val)
#define | SREV(x)
#define | IREV(x)
#define | LREV(x)
#define | RSVAL(buf, pos)
#define | RSVALS(buf, pos)
#define | RIVAL(buf, pos)
#define | RIVALS(buf, pos)
#define | RLVAL(buf, pos)
#define | RLVALS(buf, pos)
#define | RSSVAL(buf, pos, val)
#define | RSSVALS(buf, pos, val)
#define | RSIVAL(buf, pos, val)
#define | RSIVALS(buf, pos, val)
#define | RSLVAL(buf, pos, val)
#define | RSLVALS(buf, pos, val)
#define | ALIGN4(p, base)
#define | ALIGN2(p, base)

## Macro Definition Documentation

## ◆ ALIGN2

#define ALIGN2 | ( |  | p,
|  |  | base )

Value:
((p) + ((2 - (PTR_DIFF((p), (base)) & 1)) & 1))
base
static struct event_base * base
Definition netatalk.c:71
p
static gcry_mpi_t p
Definition uams_dhx2_pam.c:39

## ◆ ALIGN4

#define ALIGN4 | ( |  | p,
|  |  | base )

Value:
((p) + ((4 - (PTR_DIFF((p), (base)) & 3)) & 3))

## ◆ CAREFUL_ALIGNMENT

#define CAREFUL_ALIGNMENT 1

## ◆ CVAL

#define CVAL | ( |  | buf,
|  |  | pos )

Value:
((unsigned)(((const unsigned char *)(buf))[pos]))
buf
static char buf[MAXPATHLEN+1]
Definition afppasswd.c:75

## ◆ CVAL_NC

#define CVAL_NC | ( |  | buf,
|  |  | pos )

Value:
(((unsigned char *)(buf))[pos])

Non-const version of CVAL

## ◆ IREV

#define IREV | ( |  | x | ) |

Value:
((SREV(x)<<16) | (SREV((x)>>16)))
SREV
#define SREV(x)
Definition byteorder.h:194

## ◆ IVAL

#define IVAL | ( |  | buf,
|  |  | pos )

Value:
(*(const uint32_t *)((const char *)(buf) + (pos)))

## ◆ IVAL_NC

#define IVAL_NC | ( |  | buf,
|  |  | pos )

Value:
(*(uint32_t *)((char *)(buf) + (pos)))

Non const version of above.

## ◆ IVALS

#define IVALS | ( |  | buf,
|  |  | pos )

Value:
(*(const int32_t *)((const char *)(buf) + (pos)))

## ◆ IVALS_NC

#define IVALS_NC | ( |  | buf,
|  |  | pos )

Value:
(*(int32_t *)((char *)(buf) + (pos)))

Non const version of above.

## ◆ LREV

#define LREV | ( |  | x | ) |

Value:
((IREV(x)<<32) | (IREV((x)>>32)))
IREV
#define IREV(x)
Definition byteorder.h:195

## ◆ LVAL

#define LVAL | ( |  | buf,
|  |  | pos )

Value:
(*(const uint64_t *)((const char *)(buf) + (pos)))

## ◆ LVAL_NC

#define LVAL_NC | ( |  | buf,
|  |  | pos )

Value:
(*(uint64_t *)((char *)(buf) + (pos)))

## ◆ LVALS

#define LVALS | ( |  | buf,
|  |  | pos )

Value:
(*(const int64_t *)((const char *)(buf) + (pos)))

## ◆ LVALS_NC

#define LVALS_NC | ( |  | buf,
|  |  | pos )

Value:
(*(int64_t *)((char *)(buf) + (pos)))

## ◆ PVAL

#define PVAL | ( |  | buf,
|  |  | pos )

Value:
(CVAL(buf,pos))
CVAL
#define CVAL(buf, pos)
Definition byteorder.h:110

## ◆ RIVAL

#define RIVAL | ( |  | buf,
|  |  | pos )

Value:
IREV(IVAL(buf,pos))
IVAL
#define IVAL(buf, pos)
Definition byteorder.h:172

## ◆ RIVALS

#define RIVALS | ( |  | buf,
|  |  | pos )

Value:
IREV(IVALS(buf,pos))
IVALS
#define IVALS(buf, pos)
Definition byteorder.h:178

## ◆ RLVAL

#define RLVAL | ( |  | buf,
|  |  | pos )

Value:
LREV(LVAL(buf,pos))
LVAL
#define LVAL(buf, pos)
Definition byteorder.h:174
LREV
#define LREV(x)
Definition byteorder.h:196

## ◆ RLVALS

#define RLVALS | ( |  | buf,
|  |  | pos )

Value:
LREV(LVALS(buf,pos))
LVALS
#define LVALS(buf, pos)
Definition byteorder.h:180

## ◆ RSIVAL

#define RSIVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SIVAL(buf,pos,IREV(val))
SIVAL
#define SIVAL(buf, pos, val)
Definition byteorder.h:185

## ◆ RSIVALS

#define RSIVALS | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SIVALS(buf,pos,IREV(val))
SIVALS
#define SIVALS(buf, pos, val)
Definition byteorder.h:188

## ◆ RSLVAL

#define RSLVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SLVAL(buf,pos,LREV(val))
SLVAL
#define SLVAL(buf, pos, val)
Definition byteorder.h:186

## ◆ RSLVALS

#define RSLVALS | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SLVALS(buf,pos,LREV(val))
SLVALS
#define SLVALS(buf, pos, val)
Definition byteorder.h:189

## ◆ RSSVAL

#define RSSVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SSVAL(buf,pos,SREV(val))
SSVAL
#define SSVAL(buf, pos, val)
Definition byteorder.h:184

## ◆ RSSVALS

#define RSSVALS | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SSVALS(buf,pos,SREV(val))
SSVALS
#define SSVALS(buf, pos, val)
Definition byteorder.h:187

## ◆ RSVAL

#define RSVAL | ( |  | buf,
|  |  | pos )

Value:
SREV(SVAL(buf,pos))
SVAL
#define SVAL(buf, pos)
Definition byteorder.h:170

## ◆ RSVALS

#define RSVALS | ( |  | buf,
|  |  | pos )

Value:
SREV(SVALS(buf,pos))
SVALS
#define SVALS(buf, pos)
Definition byteorder.h:176

## ◆ SCVAL

#define SCVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
(CVAL_NC(buf,pos) = (val))
CVAL_NC
#define CVAL_NC(buf, pos)
Definition byteorder.h:111

## ◆ SIVAL

#define SIVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
IVAL_NC(buf,pos)=((uint32_t)(val))
IVAL_NC
#define IVAL_NC(buf, pos)
Definition byteorder.h:173

## ◆ SIVALS

#define SIVALS | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
IVALS_NC(buf,pos)=((int32_t)(val))
IVALS_NC
#define IVALS_NC(buf, pos)
Definition byteorder.h:179

## ◆ SLVAL

#define SLVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
LVAL_NC(buf,pos)=((uint64_t)(val))
LVAL_NC
#define LVAL_NC(buf, pos)
Definition byteorder.h:175

## ◆ SLVALS

#define SLVALS | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
LVALS_NC(buf,pos)=((int64_t)(val))
LVALS_NC
#define LVALS_NC(buf, pos)
Definition byteorder.h:181

## ◆ SREV

#define SREV | ( |  | x | ) |

Value:
((((x)&0xFF)<<8) | (((x)>>8)&0xFF))

## ◆ SSVAL

#define SSVAL | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SVAL_NC(buf,pos)=((uint16_t)(val))
SVAL_NC
#define SVAL_NC(buf, pos)
Definition byteorder.h:171

## ◆ SSVALS

#define SSVALS | ( |  | buf,
|  |  | pos,
|  |  | val )

Value:
SVALS_NC(buf,pos)=((int16)(val))
SVALS_NC
#define SVALS_NC(buf, pos)
Definition byteorder.h:177

## ◆ SVAL

#define SVAL | ( |  | buf,
|  |  | pos )

Value:
(*(const uint16_t *)((const char *)(buf) + (pos)))

## ◆ SVAL_NC

#define SVAL_NC | ( |  | buf,
|  |  | pos )

Value:
(*(uint16_t *)((char *)(buf) + (pos)))

Non const version of above.

## ◆ SVALS

#define SVALS | ( |  | buf,
|  |  | pos )

Value:
(*(const int16_t *)((const char *)(buf) + (pos)))

## ◆ SVALS_NC

#define SVALS_NC | ( |  | buf,
|  |  | pos )

Value:
(*(int16 *)((char *)(buf) + (pos)))

Non const version of above.