00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef OVAL_SYSCHAR_IMPL
00031 #define OVAL_SYSCHAR_IMPL
00032
00033 #include "public/oval_system_characteristics.h"
00034 #include "oval_definitions_impl.h"
00035 #include "../common/util.h"
00036
00037 OSCAP_HIDDEN_START;
00038
00039 extern const char NAMESPACE_OVALSYS[];
00040
00041 struct oval_sysint *oval_sysint_new(void);
00042 struct oval_sysint *oval_sysint_clone(struct oval_sysint *);
00043 void oval_sysint_free(struct oval_sysint *);
00044
00045 void oval_sysint_set_name(struct oval_sysint *, char *);
00046 void oval_sysint_set_ip_address(struct oval_sysint *, char *);
00047 void oval_sysint_set_mac_address(struct oval_sysint *, char *);
00048 typedef void (*oval_sysint_consumer)(struct oval_sysint*, void*);
00049 int oval_sysint_parse_tag
00050 (xmlTextReaderPtr, struct oval_parser_context*,
00051 oval_sysint_consumer, void*);
00052 void oval_sysint_to_print(struct oval_sysint *, char *, int);
00053 void oval_sysint_to_dom (struct oval_sysint *, xmlDoc *, xmlNode *);
00054
00055 struct oval_sysinfo *oval_sysinfo_new(void);
00056 struct oval_sysinfo *oval_sysinfo_clone(struct oval_sysinfo *);
00057 void oval_sysinfo_free(struct oval_sysinfo *);
00058 void oval_sysinfo_to_print(struct oval_sysinfo *, char *, int);
00059 void oval_sysinfo_to_dom (struct oval_sysinfo *, xmlDoc *, xmlNode *);
00060 int oval_sysinfo_parse_tag(xmlTextReaderPtr reader, struct oval_parser_context *);
00061
00062 void oval_sysinfo_set_os_name(struct oval_sysinfo *, char *);
00063 void oval_sysinfo_set_os_version(struct oval_sysinfo *, char *);
00064 void oval_sysinfo_set_os_architecture(struct oval_sysinfo *, char *);
00065 void oval_sysinfo_set_primary_host_name(struct oval_sysinfo *, char *);
00066 void oval_sysinfo_add_interface(struct oval_sysinfo *, struct oval_sysint *);
00067
00068 struct oval_sysdata *oval_sysdata_new(char *id);
00069 struct oval_sysdata *oval_sysdata_clone(struct oval_sysdata *old_data, struct oval_syschar_model *model);
00070 void oval_sysdata_free(struct oval_sysdata *);
00071 void oval_sysdata_to_print(struct oval_sysdata *, char *, int);
00072 void oval_sysdata_to_dom (struct oval_sysdata *, xmlDoc *, xmlNode *);
00073 int oval_sysdata_parse_tag(xmlTextReaderPtr, struct oval_parser_context *);
00074
00075 void oval_sysdata_set_status(struct oval_sysdata *, oval_syschar_status_t);
00076 void oval_sysdata_set_subtype(struct oval_sysdata *sysdata, oval_subtype_t subtype);
00077 void oval_sysdata_set_message(struct oval_sysdata *data, char *message);
00078 void oval_sysdata_set_message_level(struct oval_sysdata *data, oval_message_level_t level);
00079 void oval_sysdata_add_item(struct oval_sysdata *, struct oval_sysitem *);
00080
00081 struct oval_syschar *oval_syschar_new(struct oval_object *);
00082 struct oval_syschar *oval_syschar_clone(struct oval_syschar *old_syschar, struct oval_syschar_model *sys_model);
00083 void oval_syschar_free(struct oval_syschar *);
00084
00085 void oval_syschar_add_message(struct oval_syschar *syschar, struct oval_message *message);
00086 void oval_syschar_set_flag(struct oval_syschar *model, oval_syschar_collection_flag_t flag);
00087 void oval_syschar_set_object(struct oval_syschar *, struct oval_object *);
00088 void oval_syschar_add_variable_binding(struct oval_syschar *, struct oval_variable_binding *);
00089 void oval_syschar_add_sysdata(struct oval_syschar *, struct oval_sysdata *);
00090 void oval_syschar_to_dom (struct oval_syschar *, xmlDoc *, xmlNode *);
00091 int oval_syschar_parse_tag(xmlTextReaderPtr, struct oval_parser_context *context);
00092 oval_syschar_collection_flag_t oval_syschar_flag_parse(xmlTextReaderPtr, char *, oval_syschar_collection_flag_t);
00093 oval_syschar_status_t oval_syschar_status_parse(xmlTextReaderPtr, char *, oval_syschar_status_t);
00094
00095
00096
00097
00098
00099
00100 struct oval_sysitem *oval_sysitem_new(void);
00101 struct oval_sysitem *oval_sysitem_clone(struct oval_sysitem *old_item);
00102 typedef void (*oval_sysitem_consumer)(struct oval_sysitem *, void* client);
00103 int oval_sysitem_parse_tag(
00104 xmlTextReaderPtr,
00105 struct oval_parser_context *,
00106 oval_sysitem_consumer, void*);
00107 void oval_sysitem_free(struct oval_sysitem *);
00108 void oval_sysitem_to_print(struct oval_sysitem *, char *, int);
00109 void oval_sysitem_set_name(struct oval_sysitem *sysitem, char *name);
00110 void oval_sysitem_set_value(struct oval_sysitem *sysitem, char *value);
00111 void oval_sysitem_set_status(struct oval_sysitem *sysitem, oval_syschar_status_t status);
00112 void oval_sysitem_set_datatype(struct oval_sysitem *sysitem, oval_datatype_t type);
00113 void oval_sysitem_set_mask(struct oval_sysitem *sysitem, int mask);
00114 void oval_sysitem_to_dom (struct oval_sysitem *sysitem, xmlDoc *doc, xmlNode *tag_parent);
00115
00116 OSCAP_HIDDEN_END;
00117
00118 #endif