PageRenderTime 53ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/src/lib/ipv6.h

http://github.com/trema/trema
C Header | 46 lines | 12 code | 10 blank | 24 comment | 0 complexity | 1e42f610da98e3ac72143aec25c527dc MD5 | raw file
Possible License(s): GPL-2.0
  1. /*
  2. * IPv6 header definitions
  3. *
  4. * Copyright (C) 2008-2012 NEC Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License, version 2, as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. */
  19. #ifndef IPV6_H
  20. #define IPV6_H
  21. #define IPV6_ADDRLEN 16
  22. typedef struct {
  23. uint32_t hdrctl;
  24. uint16_t plen;
  25. uint8_t nexthdr;
  26. uint8_t hoplimit;
  27. uint8_t saddr[ IPV6_ADDRLEN ];
  28. uint8_t daddr[ IPV6_ADDRLEN ];
  29. } ipv6_header_t;
  30. #endif // IPV6_H
  31. /*
  32. * Local variables:
  33. * c-basic-offset: 2
  34. * indent-tabs-mode: nil
  35. * End:
  36. */