do_op_set.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* readconf/include/do_op_set.h
  2. *
  3. * This file is part of readconf.
  4. *
  5. * readconf 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. * readconf 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
  16. * along with readconf. If not, see <https://www.gnu.org/licenses/>
  17. */
  18. #ifndef __DO_OP_SET_H
  19. #define __DO_OP_SET_H
  20. #include <port.h>
  21. #include <klist.h>
  22. #define SET_TYPE_INVALID 0
  23. #define SET_TYPE_UINT 1
  24. #define SET_TYPE_STR 2
  25. struct readconf_strconf {
  26. char *conf_key;
  27. int conf_key_len;
  28. char *conf_value;
  29. int conf_value_len;
  30. };
  31. struct readconf_uintconf {
  32. char *conf_key;
  33. int conf_key_len;
  34. __uint64_t conf_value;
  35. };
  36. #define NODETYPE_INVALID 0
  37. #define NODETYPE_STR 1
  38. #define NODETYPE_UINT 2
  39. extern struct klist_node name_list;
  40. int show_names(void);
  41. #endif