isis_common.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * IS-IS Rout(e)ing protocol - isis_common.h
  3. * some common data structures
  4. *
  5. * Copyright (C) 2001,2002 Sampo Saaristo
  6. * Tampere University of Technology
  7. * Institute of Communications Engineering
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public Licenseas published by the Free
  11. * Software Foundation; either version 2 of the License, or (at your option)
  12. * any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,but WITHOUT
  15. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  17. * more details.
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. #ifndef ISIS_COMMON_H
  23. #define ISIS_COMMON_H
  24. /*
  25. * Area Address
  26. */
  27. struct area_addr
  28. {
  29. u_char addr_len;
  30. u_char area_addr[20];
  31. };
  32. struct isis_passwd
  33. {
  34. u_char len;
  35. #define ISIS_PASSWD_TYPE_UNUSED 0
  36. #define ISIS_PASSWD_TYPE_CLEARTXT 1
  37. #define ISIS_PASSWD_TYPE_HMAC_MD5 54
  38. #define ISIS_PASSWD_TYPE_PRIVATE 255
  39. u_char type;
  40. /* Authenticate SNPs? */
  41. #define SNP_AUTH_SEND 0x01
  42. #define SNP_AUTH_RECV 0x02
  43. u_char snp_auth;
  44. u_char passwd[255];
  45. };
  46. /*
  47. * (Dynamic) Hostname
  48. * one struct for cache list
  49. * one struct for LSP TLV
  50. */
  51. struct hostname
  52. {
  53. u_char namelen;
  54. u_char name[255];
  55. };
  56. /*
  57. * Supported Protocol IDs
  58. */
  59. struct nlpids
  60. {
  61. u_char count;
  62. u_char nlpids[4]; /* FIXME: enough ? */
  63. };
  64. #endif