test_dhcp6.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Copyright (C) 2014 Mamadou DIOP.
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO 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 Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. *
  18. */
  19. #ifndef TNET_TEST_DHCP6_H
  20. #define TNET_TEST_DHCP6_H
  21. void test_dhcp6_requestinfo(tnet_dhcp6_ctx_t *ctx)
  22. {
  23. tnet_dhcp6_option_orequest_t *orequest = tnet_dhcp6_option_orequest_create_null();
  24. tnet_dhcp6_reply_t* reply = 0;
  25. tnet_dhcp6_option_orequest_add_code(orequest, 24);
  26. tnet_dhcp6_option_orequest_add_code(orequest, 23);
  27. tnet_dhcp6_option_orequest_add_code(orequest, 21); /* SIP Servers Domain Name List */
  28. tnet_dhcp6_option_orequest_add_code(orequest, 22); /* SIP Servers IPv6 Address List */
  29. reply = tnet_dhcp6_requestinfo(ctx, orequest);
  30. TSK_OBJECT_SAFE_FREE(orequest);
  31. TSK_OBJECT_SAFE_FREE(reply);
  32. }
  33. void test_dhcp6()
  34. {
  35. tnet_dhcp6_ctx_t *ctx = tnet_dhcp6_ctx_create();
  36. test_dhcp6_requestinfo(ctx);
  37. TSK_OBJECT_SAFE_FREE(ctx);
  38. }
  39. #endif /* TNET_TEST_DHCP6_H */