Revision 8576a795 som/ChunkTrading/chunk_signaling.c

View differences:

som/ChunkTrading/chunk_signaling.c
22 22
#include "chunkidset.h"
23 23
#include "trade_sig_la.h"
24 24
#include "trade_sig_ha.h"
25
#include "int_coding.h"
25 26

  
26 27
//Type of signaling message
27 28
//Request a ChunkIDSet
......
48 49
//set the local node ID
49 50
static struct nodeID *localID;
50 51

  
51

  
52
static inline void int_cpy(uint8_t *p, int v)
53
{
54
  int tmp;
55

  
56
  tmp = htonl(v);
57
  memcpy(p, &tmp, 4);
58
}
59

  
60
static inline int int_rcpy(const uint8_t *p)
61
{
62
  int tmp;
63

  
64
  memcpy(&tmp, p, 4);
65
  tmp = ntohl(tmp);
66

  
67
  return tmp;
68
}
69

  
70 52
int chunkSignalingInit(struct nodeID *myID)
71 53
{
72 54
    if(!myID)

Also available in: Unified diff