Advertisement
Guest User

msg.h

a guest
Feb 25th, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. /* This is the header file for msgSender.c and msgLogger.c */
  2. #ifndef MSG_H
  3. #define MSG_H
  4.  
  5. #include <sys/neutrino.h>
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <errno.h>
  9.  
  10. /* Define data types and buffer sizes */
  11. #define MSG_HEADER  int
  12. #define MSG_TYPE    char
  13. #define MSG_SIZE    256
  14.  
  15. /* Define the known message types */
  16. #define MSG_DATA    1
  17. #define MSG_END     31
  18.  
  19. /* Define reply status values */
  20. #define MSG_OK      0
  21. #define MSG_INVALID 101
  22. /* Can also use MSG_END as a reply */
  23.  
  24. typedef struct {
  25.    MSG_HEADER  m_hdr;
  26.    MSG_TYPE    m_data[MSG_SIZE];
  27. } MESSAGE;
  28.  
  29. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement