opcell.h 821 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * opcell.h
  3. * Onion Proxy Cell.
  4. *
  5. * Matej Pfajfar <mp292@cam.ac.uk>
  6. */
  7. /*
  8. * Changes :
  9. * $Log$
  10. * Revision 1.1 2002/06/26 22:45:50 arma
  11. * Initial revision
  12. *
  13. * Revision 1.1 2002/03/03 12:08:18 mp292
  14. * Added a new type of cell - used for data going between the onion proxy and
  15. * the first or hop. Payload size identical to that of a normal cell.
  16. *
  17. */
  18. #ifndef __OPCELL_H
  19. #include <stdint.h>
  20. #include "cell.h"
  21. #define OPCELL_PAYLOAD_SIZE CELL_PAYLOAD_SIZE
  22. #define OPCELL_PADDING 0
  23. #define OPCELL_DATA 1
  24. /* cell definition */
  25. typedef struct
  26. {
  27. unsigned char command;
  28. unsigned char length; /* of payload */
  29. unsigned char payload[OPCELL_PAYLOAD_SIZE];
  30. } opcell_t;
  31. opcell_t *new_data_opcell(unsigned char length, unsigned char *buf);
  32. opcell_t *new_padding_opcell();
  33. #define __OPCELL_H
  34. #endif