Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.1 KiB

  1. /*******************************************************************/
  2. /* Copyright(c) 1993 Microsoft Corporation */
  3. /*******************************************************************/
  4. //***
  5. //
  6. // Filename: packet.h
  7. //
  8. // Description: Contains general definitions for the ipx and rip packets
  9. //
  10. // Author: Stefan Solomon (stefans) October 4, 1993.
  11. //
  12. // Revision History:
  13. //
  14. //***
  15. #ifndef _PACKET_
  16. #define _PACKET_
  17. //*** Socket Numbers
  18. #define IPX_RIP_SOCKET (USHORT)0x453
  19. //*** Packet Types
  20. #define IPX_RIP_TYPE 1 // RIP request/reply packet
  21. //*** RIP Operations
  22. #define RIP_REQUEST (USHORT)1
  23. #define RIP_RESPONSE (USHORT)2
  24. //*** Offsets into the IPX header
  25. #define IPXH_HDRSIZE 30 // Size of the IPX header
  26. #define IPXH_CHECKSUM 0 // Checksum
  27. #define IPXH_LENGTH 2 // Length
  28. #define IPXH_XPORTCTL 4 // Transport Control
  29. #define IPXH_PKTTYPE 5 // Packet Type
  30. #define IPXH_DESTADDR 6 // Dest. Address (Total)
  31. #define IPXH_DESTNET 6 // Dest. Network Address
  32. #define IPXH_DESTNODE 10 // Dest. Node Address
  33. #define IPXH_DESTSOCK 16 // Dest. Socket Number
  34. #define IPXH_SRCADDR 18 // Source Address (Total)
  35. #define IPXH_SRCNET 18 // Source Network Address
  36. #define IPXH_SRCNODE 22 // Source Node Address
  37. #define IPXH_SRCSOCK 28 // Source Socket Number
  38. #define IPX_NET_LEN 4
  39. #define IPX_NODE_LEN 6
  40. //*** RIP Operation Field Offset
  41. #define RIP_OPCODE 30 // rip operation code offset
  42. //*** Network entry structure in the RIP request/response
  43. #define RIP_INFO 32 // first network entry offset in the rip packet
  44. #define NE_ENTRYSIZE 8 // 4 network + 2 hops + 2 ticks
  45. #define NE_NETNUMBER 0 // network number offset
  46. #define NE_NROFHOPS 4 // number of hops offset
  47. #define NE_NROFTICKS 6 // number of ticks offset
  48. //*** maximum nr of hops for a normal packet ***
  49. #define IPX_MAX_HOPS 16
  50. //*** define max RIP packet size
  51. #define RIP_PACKET_LEN 432
  52. #define MAX_PACKET_LEN 1500
  53. #endif