Advertisement
Guest User

Packages

a guest
Dec 18th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.78 KB | None | 0 0
  1. /* MSG_REGISTRATION_REQUEST */
  2. struct registrationRequest {
  3.     /* Type + Length */
  4.     BASE_STRUCT
  5.     /* IP Address */
  6.     uint32_t ipAddress;
  7.     /* Port */
  8.     uint16_t port;
  9.     /* Strengths Own << 4 || Peer */
  10.     uint16_t strengths;
  11.     /* Name Length */
  12.     uint16_t nameLength;
  13.     /* Password Length */
  14.     uint16_t passwordLength;
  15.     /* Name */
  16.     char ownName[1];
  17.     /* Password */
  18.     char password[1];
  19. };
  20.  
  21. /* MSG_REGISTRATION_ACK */
  22. struct registrationAck {
  23.     /* Type + Length */
  24.     BASE_STRUCT
  25. };
  26.  
  27. /* MSG_PEER_INFO */
  28. struct peerInfo {
  29.     /* Type + Length */
  30.     BASE_STRUCT
  31.     /* IP Address */
  32.     uint32_t ipAddress;
  33.     /* Port */
  34.     uint16_t port;
  35.     /* Start */
  36.     uint16_t start;
  37.     /* Opponent Name */
  38.     char oppName[1];
  39. };
  40.  
  41. /* MSG_PEER_INFO_ACK */
  42. struct peerInfoAck {
  43.     /* Type + Length */
  44.     BASE_STRUCT
  45. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement