#include <library.h>
#include <hydra.h>
#include <daemon.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/* we need to fake the pluto symbol to dlopen() the xauth plugin */
void *pluto;
#include <libbridge.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "bridge.h"
#define BRIDGE_H
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct bridge_t bridge_t;
#include <debug.h>
#include <threading/thread.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/** define _XOPEN_SOURCE 500 fails when using libstrongswan, define popen */
extern ssize_t pread(int fd, void *buf, size_t count, off_t offset);
#include <errno.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "dumm.h"
#include <signal.h>
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include "guest.h"
#include "bridge.h"
#include <library.h>
#include <dumm.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#undef PACKAGE_NAME
#undef PACKAGE_TARNAME
#include <stdarg.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "dumm.h"
#include "guest.h"
#define GUEST_H
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef enum guest_state_t guest_state_t;
typedef struct guest_t guest_t;
#include <linux/if_tun.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "iface.h"
#define IFACE_H
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <networking/host.h>
#define TAP_DEVICE "/dev/net/tun"
#include "dumm.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <sys/types.h>
#include <unistd.h>
#include "kernel/network_manager.h"
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef enum android_vpn_state_t android_vpn_state_t;
typedef struct charonservice_t charonservice_t;
#include <library.h>
#include <config/ike_cfg.h>
#include <config/peer_cfg.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* The interface for a configuration backend.
#include <sys/types.h>
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
#include <library.h>
#include <networking/host.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
#include <config/proposal.h>
#include <crypto/diffie_hellman.h>
#include <daemon.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
ENUM(cert_policy_names, CERT_ALWAYS_SEND, CERT_NEVER_SEND,
#include <library.h>
#include <utils/identification.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <selectors/traffic_selector.h>
#include <config/proposal.h>
#include <config/ike_cfg.h>
#include "proposal.h"
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
#include <crypto/transform.h>
#include <library.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <networking/host.h>
#include <crypto/transform.h>
#include <crypto/crypters/crypter.h>
#include <library.h>
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/proposal_substructure.h>
#include <encoding/payloads/transform_substructure.h>
#include <sa/keymat.h>
#include <sa/ike_sa_id.h>
#include <networking/packet.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* This class is used to represent an IKE-Message.
#include <library.h>
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <encoding/payloads/encodings.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/sa_payload.h>
#include "cp_payload.h"
#include <encoding/payloads/encodings.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
ENUM(config_type_names, CFG_REQUEST, CFG_ACK,
"CFG_REQUEST",
#include <library.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/configuration_attribute.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/**
* Config Type of an Configuration Payload.
#include <daemon.h>
#include <encoding/payloads/encodings.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <encoding/generator.h>
#include <encoding/parser.h>
#include <library.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/transform_substructure.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <crypto/diffie_hellman.h>
/**
#include <library.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/proposal_substructure.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* Notify message types for IKEv2, and a subset for IKEv1.
#include <encoding/payloads/encodings.h>
#include <encoding/payloads/transform_substructure.h>
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <daemon.h>
/**
#include <encoding/payloads/payload.h>
#include <encoding/payloads/transform_substructure.h>
#include <config/proposal.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <kernel/kernel_ipsec.h>
#include <sa/authenticator.h>
#include "sa_payload.h"
#include <encoding/payloads/encodings.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <daemon.h>
/* IKEv1 situation */
#include <library.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/proposal_substructure.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <kernel/kernel_ipsec.h>
#include <sa/authenticator.h>
#include "traffic_selector_substructure.h"
#include <encoding/payloads/encodings.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_traffic_selector_substructure_t private_traffic_selector_substructure_t;
#include <encoding/payloads/transform_attribute.h>
#include <encoding/payloads/encodings.h>
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <daemon.h>
typedef struct private_transform_substructure_t private_transform_substructure_t;
#include <library.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/transform_attribute.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <crypto/diffie_hellman.h>
#include <crypto/signers/signer.h>
#include <crypto/prfs/prf.h>
#include "ts_payload.h"
#include <encoding/payloads/encodings.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_ts_payload_t private_ts_payload_t;
typedef struct ts_payload_t ts_payload_t;
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <selectors/traffic_selector.h>
#include <encoding/payloads/payload.h>
#include <encoding/payloads/traffic_selector_substructure.h>
#include <library.h>
#include <networking/packet.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <plugins/plugin.h>
/**
#include <daemon.h>
#include <threading/thread.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_socket_manager_t private_socket_manager_t;
#include "android_handler.h"
#include <networking/host.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <cutils/properties.h>
#include <debug.h>
#include <daemon.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <threading/mutex.h>
#include <credentials/certificates/x509.h>
typedef struct certexpire_export_t certexpire_export_t;
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* Caches and exports trustchain information to CSV files.
#include "dhcp_provider.h"
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <threading/mutex.h>
typedef struct private_dhcp_provider_t private_dhcp_provider_t;
#include <linux/if_ether.h>
#include <linux/filter.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
#include "dhcp_transaction.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_dhcp_transaction_t private_dhcp_transaction_t;
#include <daemon.h>
#include <threading/mutex.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <encoding/payloads/delete_payload.h>
#include <processing/jobs/delete_ike_sa_job.h>
#include <daemon.h>
#include <threading/mutex.h>
#include <threading/thread.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
#define DUPLICHECK_SOCKET IPSEC_PIDDIR "/charon.dck"
#include <daemon.h>
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <crypto/crypters/crypter.h>
#include <crypto/hashers/hasher.h>
#include <radius_message.h>
#include <radius_client.h>
#include <daemon.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <threading/mutex.h>
typedef struct private_eap_radius_accounting_t private_eap_radius_accounting_t;
#include "eap_radius_forward.h"
#include <daemon.h>
-#include <utils/linked_list.h>
-#include <utils/hashtable.h>
+#include <collections/linked_list.h>
+#include <collections/hashtable.h>
#include <threading/mutex.h>
typedef struct private_eap_radius_forward_t private_eap_radius_forward_t;
#include <errno.h>
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
#include <simaka_manager.h>
#ifndef EAP_SIM_FILE_TRIPLETS_H_
#define EAP_SIM_FILE_TRIPLETS_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct eap_sim_file_triplets_t eap_sim_file_triplets_t;
#include "eap_simaka_pseudonym_card.h"
#include <daemon.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
typedef struct private_eap_simaka_pseudonym_card_t private_eap_simaka_pseudonym_card_t;
#include "eap_simaka_pseudonym_provider.h"
#include <debug.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
typedef struct private_eap_simaka_pseudonym_provider_t private_eap_simaka_pseudonym_provider_t;
#include "eap_simaka_reauth_card.h"
#include <daemon.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
typedef struct private_eap_simaka_reauth_card_t private_eap_simaka_reauth_card_t;
#include "eap_simaka_reauth_provider.h"
#include <daemon.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
typedef struct private_eap_simaka_reauth_provider_t private_eap_simaka_reauth_provider_t;
#include "farp_listener.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_farp_listener_t private_farp_listener_t;
#include "ha_attribute.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
typedef struct private_ha_attribute_t private_ha_attribute_t;
#include "ha_cache.h"
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
#include <processing/jobs/callback_job.h>
#include "ha_kernel.h"
#include "ha_socket.h"
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <sa/ike_sa.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
#include "lookip_listener.h"
#include <daemon.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_lookip_listener_t private_lookip_listener_t;
#include <daemon.h>
#include <threading/thread.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
#include "lookip_msg.h"
#include <daemon.h>
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct private_medcli_creds_t private_medcli_creds_t;
#include <daemon.h>
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct private_medsrv_creds_t private_medsrv_creds_t;
#include <daemon.h>
#include <threading/thread.h>
#include <threading/rwlock.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
/* Maximum size of a packet */
#define MAX_PACKET 10000
#include "stroke_attribute.h"
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_stroke_attribute_t private_stroke_attribute_t;
#include "stroke_cred.h"
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <crypto/hashers/hasher.h>
#include <daemon.h>
#include <credentials/certificates/ac.h>
#include <credentials/sets/mem_cred.h>
#include <credentials/sets/callback_cred.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/lexparser.h>
#include <threading/rwlock.h>
#include <daemon.h>
#include <stroke_msg.h>
#include <credentials/credential_set.h>
#include <credentials/certificates/certificate.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct stroke_cred_t stroke_cred_t;
#include "stroke_handler.h"
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_stroke_handler_t private_stroke_handler_t;
#include <hydra.h>
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <plugins/plugin.h>
#include <credentials/certificates/x509.h>
#include <credentials/certificates/ac.h>
#include <threading/mutex.h>
#include <threading/thread.h>
#include <threading/condvar.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
#include "stroke_config.h"
#include <debug.h>
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
typedef struct private_tnc_imc_t private_tnc_imc_t;
#include <tncifimc.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
#include <daemon.h>
#include <debug.h>
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
typedef struct private_tnc_imv_t private_tnc_imv_t;
#include <tnc/imv/imv_recommendations.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_tnc_imv_recommendations_t private_tnc_imv_recommendations_t;
typedef struct recommendation_entry_t recommendation_entry_t;
#define TNC_IMV_RECOMMENDATIONS_H_
#include <tnc/imv/imv_recommendations.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* Create an IMV empty recommendations instance
#include "tnc_pdp_connections.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_tnc_pdp_connections_t private_tnc_pdp_connections_t;
#include <tnc/imv/imv_manager.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_tnc_tnccs_manager_t private_tnc_tnccs_manager_t;
enumerator_t *enumerator;
tnccs_connection_entry_t *entry;
bool attribute_match = FALSE, entry_found = FALSE;
-
+
if (is_imc)
{
switch (attribute_id)
return TNC_RESULT_INVALID_PARAMETER;
}
}
-
+
/* attributes specific to the TNCC or TNCS are unsupported */
if (id == TNC_CONNECTIONID_ANY)
{
entry->max_msg_len);
case TNC_ATTRIBUTEID_HAS_LONG_TYPES:
case TNC_ATTRIBUTEID_HAS_EXCLUSIVE:
- return bool_attribute(buffer_len, buffer, value_len,
+ return bool_attribute(buffer_len, buffer, value_len,
entry->type == TNCCS_2_0);
case TNC_ATTRIBUTEID_HAS_SOH:
- return bool_attribute(buffer_len, buffer, value_len,
+ return bool_attribute(buffer_len, buffer, value_len,
entry->type == TNCCS_SOH);
case TNC_ATTRIBUTEID_IFTNCCS_PROTOCOL:
{
#include <tnc/tnccs/tnccs.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
#include <libxml/parser.h>
typedef struct tnccs_msg_t tnccs_msg_t;
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <libxml/parser.h>
/**
#include <tnc/tnccs/tnccs.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
#include <pen/pen.h>
bio_writer_t *writer;
/* build PB-TNC batch header */
- writer = bio_writer_create(this->batch_len);
+ writer = bio_writer_create(this->batch_len);
writer->write_uint8 (writer, PB_TNC_VERSION);
writer->write_uint8 (writer, this->is_server ?
PB_TNC_BATCH_FLAG_D : PB_TNC_BATCH_FLAG_NONE);
writer->write_uint16(writer, this->type);
- writer->write_uint32(writer, this->batch_len);
+ writer->write_uint32(writer, this->batch_len);
/* build PB-TNC messages */
enumerator = this->messages->create_enumerator(this->messages);
fatal:
this->errors->insert_last(this->errors, msg);
- return FAILED;
+ return FAILED;
}
static status_t process_tnc_msg(private_pb_tnc_batch_t *this)
reader->destroy(reader);
noskip_flag = (flags & PB_TNC_FLAG_NOSKIP) != PB_TNC_FLAG_NONE;
-
+
if (msg_len > data.len)
{
DBG1(DBG_TNC, "%u bytes insufficient to parse PB-TNC message", data.len);
fatal:
this->errors->insert_last(this->errors, msg);
- return FAILED;
+ return FAILED;
}
METHOD(pb_tnc_batch_t, process, status_t,
#include <debug.h>
#include <daemon.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <pen/pen.h>
typedef struct private_tnccs_20_t private_tnccs_20_t;
#ifndef UCI_PARSER_H_
#define UCI_PARSER_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct uci_parser_t uci_parser_t;
* for more details.
*/
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/*******************************************************************************
*/
#include <library.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
static u_int hash(char *key)
{
#include <library.h>
#include <daemon.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <unistd.h>
#include <library.h>
#include <daemon.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/*******************************************************************************
* mysql simple test
#include <library.h>
#include <daemon.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <unistd.h>
#include <daemon.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
typedef struct private_unity_handler_t private_unity_handler_t;
#include "updown_handler.h"
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_updown_handler_t private_updown_handler_t;
#include "whitelist_listener.h"
#include <daemon.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <threading/rwlock.h>
typedef struct private_whitelist_listener_t private_whitelist_listener_t;
#include <library.h>
#include <processing/jobs/job.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* Class representing a MEDIATION Job.
#include "eap_manager.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_eap_manager_t private_eap_manager_t;
#include <library.h>
#include <hydra.h>
#include <daemon.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/lexparser.h>
#include <processing/jobs/retransmit_job.h>
#include <processing/jobs/delete_ike_sa_job.h>
#include <threading/condvar.h>
#include <threading/mutex.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <crypto/hashers/hasher.h>
/* the default size of the hash table (MUST be a power of 2) */
#include <daemon.h>
#include <encoding/generator.h>
#include <encoding/payloads/nonce_payload.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_keymat_v1_t private_keymat_v1_t;
#include <sa/ikev1/keymat_v1.h>
#include <encoding/payloads/ke_payload.h>
#include <encoding/payloads/nonce_payload.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_phase1_t private_phase1_t;
#include <daemon.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <crypto/hashers/hasher.h>
#include <processing/jobs/callback_job.h>
#include <daemon.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <processing/jobs/mediation_job.h>
typedef struct peer_t peer_t;
#include <hydra.h>
#include <daemon.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_shunt_manager_t private_shunt_manager_t;
#define SHUNT_MANAGER_H_
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <config/child_cfg.h>
typedef struct shunt_manager_t shunt_manager_t;
#include <hydra.h>
#include <daemon.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_trap_manager_t private_trap_manager_t;
#define TRAP_MANAGER_H_
#include <library.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <config/peer_cfg.h>
typedef struct trap_manager_t trap_manager_t;
#include "xauth_manager.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_xauth_manager_t private_xauth_manager_t;
#include <threading/thread.h>
#include <threading/condvar.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
-#include <utils/hashtable.h>
+#include <collections/linked_list.h>
+#include <collections/hashtable.h>
/** Intervall to check for expired sessions, in seconds */
#define CLEANUP_INTERVAL 30
#include <fcgiapp.h>
#include <stdio.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#define COOKIE_LEN 16
#include <chunk.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "attributes.h"
#include "attribute_manager.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_attribute_manager_t private_attribute_manager_t;
#include <networking/host.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct attribute_provider_t attribute_provider_t;
#include "mem_pool.h"
#include <debug.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
#define POOL_LIMIT (sizeof(uintptr_t)*8)
#include <hydra.h>
#include <debug.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_kernel_interface_t private_kernel_interface_t;
typedef struct kernel_net_t kernel_net_t;
typedef enum kernel_address_type_t kernel_address_type_t;
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <networking/host.h>
#include <plugins/plugin.h>
#include <hydra.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
#define SERVER_MAX 2
#include <hydra.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/thread.h>
#include <threading/mutex.h>
#include <processing/jobs/callback_job.h>
#include <debug.h>
#include <threading/thread.h>
#include <threading/mutex.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
/** Required for Linux 2.6.26 kernel and later */
#include <threading/rwlock.h>
#include <threading/rwlock_condvar.h>
#include <threading/spinlock.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
/** delay before firing roam events (ms) */
#include <hydra.h>
#include <debug.h>
#include <networking/host.h>
-#include <utils/linked_list.h>
-#include <utils/hashtable.h>
+#include <collections/linked_list.h>
+#include <collections/hashtable.h>
#include <threading/thread.h>
#include <threading/mutex.h>
#include <processing/jobs/callback_job.h>
#include <threading/thread.h>
#include <threading/mutex.h>
#include <threading/rwlock.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <processing/jobs/callback_job.h>
#ifndef HAVE_STRUCT_SOCKADDR_SA_LEN
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
{
return;
}
- writer = bio_writer_create(ATTR_REQUEST_ENTRY_SIZE *
+ writer = bio_writer_create(ATTR_REQUEST_ENTRY_SIZE *
this->list->get_count(this->list));
enumerator = this->list->create_enumerator(this->list);
while (enumerator->enumerate(enumerator, &entry))
- {
+ {
writer->write_uint32(writer, entry->vendor_id);
writer->write_uint32(writer, entry->type);
}
reader = bio_reader_create(this->value);
while (count--)
{
- reader->read_uint8 (reader, &reserved);
+ reader->read_uint8 (reader, &reserved);
reader->read_uint24(reader, &vendor_id);
reader->read_uint32(reader, &type);
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
chunk_t version;
};
-/**
+/**
* Free a package entry
*/
static void free_package_entry(package_entry_t *entry)
reader->read_uint16(reader, &reserved);
reader->read_uint16(reader, &count);
*offset = INSTALLED_PACKAGES_MIN_SIZE;
-
+
while (reader->remaining(reader))
{
if (!reader->read_data8(reader, &name))
{
DBG1(DBG_TNC, "insufficient data for IETF installed package version");
goto end;
- }
+ }
pos = memchr(version.ptr, '\0', version.len);
if (pos)
{
goto end;
}
*offset += 1 + version.len;
-
- entry = malloc_thing(package_entry_t);
+
+ entry = malloc_thing(package_entry_t);
entry->name = chunk_clone(name);
entry->version = chunk_clone(version);
this->packages->insert_last(this->packages, entry);
end:
reader->destroy(reader);
- return status;
+ return status;
}
METHOD(pa_tnc_attr_t, get_ref, pa_tnc_attr_t*,
entry = malloc_thing(package_entry_t);
entry->name = chunk_clone(name);
entry->version = chunk_clone(version);
- this->packages->insert_last(this->packages, entry);
+ this->packages->insert_last(this->packages, entry);
}
/**
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
while (reader->remaining(reader))
{
- entry = malloc_thing(port_entry_t);
+ entry = malloc_thing(port_entry_t);
reader->read_uint8 (reader, &blocked);
entry->blocked = blocked & 0x01;
reader->read_uint8 (reader, &entry->protocol);
}
reader->destroy(reader);
- return SUCCESS;
+ return SUCCESS;
}
METHOD(pa_tnc_attr_t, get_ref, pa_tnc_attr_t*,
entry->blocked = blocked;
entry->protocol = protocol;
entry->port = port;
- this->ports->insert_last(this->ports, entry);
+ this->ports->insert_last(this->ports, entry);
}
/**
#include <tncifimc.h>
#include <pen/pen.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <library.h>
#include <tncif_names.h>
#include <pen/pen.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_imc_msg_t private_imc_msg_t;
#include <tncifimv.h>
#include <pen/pen.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <library.h>
#include <tncif_names.h>
#include <pen/pen.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_imv_msg_t private_imv_msg_t;
#include <sys/utsname.h>
#include <stdio.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_os_info_t private_os_info_t;
if (!file)
{
DBG1(DBG_IMC, "failed to open \"%s\"", proc_uptime);
- return 0;
+ return 0;
}
if (fscanf(file, "%u", &uptime) != 1)
{
DBG1(DBG_IMC, "failed to read file \"%s\"", proc_uptime);
uptime = 0;
- }
+ }
fclose(file);
return uptime;
{
case RELEASE_LSB:
{
- /* Determine Distribution ID */
+ /* Determine Distribution ID */
pos = strstr(buf, lsb_distrib_id);
if (!pos)
{
os_name.len = pos - os_name.ptr;
- /* Determine Distribution Release */
+ /* Determine Distribution Release */
pos = strstr(buf, lsb_distrib_release);
if (!pos)
{
os_version.len = pos - os_version.ptr;
break;
- }
+ }
case RELEASE_DEBIAN:
{
char str_debian[] = "Debian";
*pos++ = ' ';
memcpy(pos, uninfo.machine, strlen(uninfo.machine));
- return TRUE;
+ return TRUE;
}
/**
chunk_t name, version;
/* As an opton OS name and OS version can be configured manually */
- name.ptr = lib->settings->get_str(lib->settings,
+ name.ptr = lib->settings->get_str(lib->settings,
"libimcv.os_info.name", NULL);
- version.ptr = lib->settings->get_str(lib->settings,
+ version.ptr = lib->settings->get_str(lib->settings,
"libimcv.os_info.version", NULL);
if (name.ptr && version.ptr)
{
name = chunk_clone(name);
version.len = strlen(version.ptr);
- version = chunk_clone(version);
+ version = chunk_clone(version);
}
else
{
#include "pa_tnc_attr_manager.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_pa_tnc_attr_manager_t private_pa_tnc_attr_manager_t;
};
METHOD(pa_tnc_attr_manager_t, add_vendor, void,
- private_pa_tnc_attr_manager_t *this, pen_t vendor_id,
+ private_pa_tnc_attr_manager_t *this, pen_t vendor_id,
pa_tnc_attr_create_t attr_create, enum_name_t *attr_names)
{
entry_t *entry;
METHOD(pa_tnc_attr_manager_t, destroy, void,
private_pa_tnc_attr_manager_t *this)
{
- this->list->destroy_function(this->list, free);
+ this->list->destroy_function(this->list, free);
free(this);
}
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <pen/pen.h>
#include <debug.h>
#define PA_TNC_RESERVED 0x000000
/**
- * PA-TNC attribute
+ * PA-TNC attribute
*
* 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
error = ietf_attr_pa_tnc_error_create(error_code, this->encoding);
goto err;
}
-
+
/* offset of the first PA-TNC attribute in the PA-TNC message */
offset = PA_TNC_HEADER_SIZE;
DBG1(DBG_TNC, "insufficient bytes for PA-TNC attribute value");
error = ietf_attr_pa_tnc_error_create_with_offset(error_code,
this->encoding, offset + PA_TNC_ATTR_INFO_SIZE);
- goto err;
- }
+ goto err;
+ }
DBG3(DBG_TNC, "%B", &value);
attr = imcv_pa_tnc_attributes->create(imcv_pa_tnc_attributes,
private_pa_tnc_msg_t *this)
{
this->attributes->destroy_offset(this->attributes,
- offsetof(pa_tnc_attr_t, destroy));
+ offsetof(pa_tnc_attr_t, destroy));
this->errors->destroy_offset(this->errors,
offsetof(pa_tnc_attr_t, destroy));
free(this->encoding.ptr);
#include <tncif_names.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_imc_test_state_t private_imc_test_state_t;
typedef struct entry_t entry_t;
* Do a handshake retry
*/
bool handshake_retry;
-
+
};
/**
.first_handshake = TRUE,
.handshake_retry = retry,
);
-
+
return &this->public.interface;
}
#include <tncif_pa_subtypes.h>
#include <pen/pen.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
/* IMV definitions */
break;
}
case IETF_ATTR_INSTALLED_PACKAGES:
- {
+ {
ietf_attr_installed_packages_t *attr_cast;
enumerator_t *e;
chunk_t name, version;
state->set_recommendation(state,
TNC_IMV_ACTION_RECOMMENDATION_ALLOW,
- TNC_IMV_EVALUATION_RESULT_COMPLIANT);
+ TNC_IMV_EVALUATION_RESULT_COMPLIANT);
assessment = TRUE;
break;
}
default:
break;
- }
+ }
}
enumerator->destroy(enumerator);
assessment = TRUE;
}
else
- {
+ {
DBG1(DBG_IMV, "requesting installed packages for '%s'",
product_info);
attr = ietf_attr_attr_request_create(PEN_IETF,
#include <tncif_pa_subtypes.h>
#include <pen/pen.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/lexparser.h>
#include <debug.h>
/**
- * Default port policy
+ * Default port policy
*
* TRUE: all server ports on the TNC client must be closed
* FALSE: any server port on the TNC client is allowed to be open
char buf[BUF_LEN], *pos = buf;
size_t len = BUF_LEN;
bool blocked, compliant = TRUE;
-
+
attr_port_filter = (ietf_attr_port_filter_t*)attr;
enumerator = attr_port_filter->create_port_enumerator(attr_port_filter);
while (enumerator->enumerate(enumerator, &blocked, &protocol, &port))
e->destroy(e);
passed = (closed_port_policy == found);
- DBG2(DBG_IMV, "%s port %5u %s: %s",
+ DBG2(DBG_IMV, "%s port %5u %s: %s",
(protocol == IPPROTO_TCP) ? "tcp" : "udp", port,
blocked ? "closed" : "open", passed ? "ok" : "fatal");
if (!passed)
pos += written;
len -= written;
}
- }
+ }
enumerator->destroy(enumerator);
if (compliant)
{
state->set_recommendation(state,
TNC_IMV_ACTION_RECOMMENDATION_ALLOW,
- TNC_IMV_EVALUATION_RESULT_COMPLIANT);
+ TNC_IMV_EVALUATION_RESULT_COMPLIANT);
}
else
{
imv_scanner_state->set_violating_ports(imv_scanner_state, buf);
state->set_recommendation(state,
TNC_IMV_ACTION_RECOMMENDATION_NO_ACCESS,
- TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MAJOR);
- }
- }
+ TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MAJOR);
+ }
+ }
}
enumerator->destroy(enumerator);
#include "imv_test_state.h"
#include <utils/lexparser.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_imv_test_state_t private_imv_test_state_t;
};
/**
- * Table of multi-lingual reason string entries
+ * Table of multi-lingual reason string entries
*/
static entry_t reasons[] = {
{ "en", "IMC Test was not configured with \"command = allow\"" },
if (chunk_equals(lang, pref_lang))
{
*reason_language = lang;
- *reason_string = chunk_create(reasons[i].string,
+ *reason_string = chunk_create(reasons[i].string,
strlen(reasons[i].string));
return TRUE;
}
/* no preferred language match found - use the default language */
*reason_string = chunk_create(reasons[0].string,
strlen(reasons[0].string));
- *reason_language = chunk_create(reasons[0].lang,
+ *reason_language = chunk_create(reasons[0].lang,
strlen(reasons[0].lang));
return TRUE;
}
}
}
enumerator->destroy(enumerator);
-
- return not_finished;
+
+ return not_finished;
}
/**
.connection_id = connection_id,
.imcs = linked_list_create(),
);
-
+
return &this->public.interface;
}
#include <library.h>
#include <debug.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
-#include <utils/blocking_queue.h>
+#include <collections/linked_list.h>
+#include <collections/blocking_queue.h>
#include <processing/jobs/callback_job.h>
typedef struct private_ipsec_event_relay_t private_ipsec_event_relay_t;
#include <debug.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/** Base priority for installed policies */
#define PRIO_BASE 512
#include <library.h>
#include <networking/host.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <ipsec/ipsec_types.h>
#include <selectors/traffic_selector.h>
#include <debug.h>
#include <library.h>
#include <threading/rwlock.h>
-#include <utils/blocking_queue.h>
+#include <collections/blocking_queue.h>
#include <processing/jobs/callback_job.h>
typedef struct private_ipsec_processor_t private_ipsec_processor_t;
#include <processing/jobs/callback_job.h>
#include <threading/condvar.h>
#include <threading/mutex.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
typedef struct private_ipsec_sa_mgr_t private_ipsec_sa_mgr_t;
#include <pen/pen.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/* IMC definitions */
}
libpts_init();
-
+
if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1)
{
DBG1(DBG_IMC, "no common IF-IMC version");
#include <tncif_names.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_imc_attestation_state_t private_imc_attestation_state_t;
.components = linked_list_create(),
.list = linked_list_create(),
);
-
+
return &this->public.interface;
}
#include <pen/pen.h>
#include <debug.h>
#include <credentials/credential_manager.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/* IMV definitions */
}
libpts_init();
-
+
if (min_version > TNC_IFIMV_VERSION_1 || max_version < TNC_IFIMV_VERSION_1)
{
DBG1(DBG_IMV, "no common IF-IMV version");
#include "imv_attestation_state.h"
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/credential_manager.h>
#include <crypto/hashers/hasher.h>
#include <libpts.h>
#include <utils/lexparser.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_imv_attestation_state_t private_imv_attestation_state_t;
* TNCCS connection state
*/
TNC_ConnectionState state;
-
+
/**
* Does the TNCCS connection support long message types?
*/
};
/**
- * Table of multi-lingual reason string entries
+ * Table of multi-lingual reason string entries
*/
static entry_t reasons[] = {
{ "en", "IMV Attestation: Incorrect/pending file measurement/component"
enumerator_t *enumerator;
file_meas_request_t *request;
bool found = FALSE;
-
+
enumerator = this->file_meas_requests->create_enumerator(this->file_meas_requests);
while (enumerator->enumerate(enumerator, &request))
{
#include "pts/components/pts_component_manager.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_pts_component_manager_t private_pts_component_manager_t;
/**
* List of vendor-specific registered Functional Components
- */
+ */
linked_list_t *components;
};
};
METHOD(pts_component_manager_t, add_vendor, void,
- private_pts_component_manager_t *this, pen_t vendor_id,
+ private_pts_component_manager_t *this, pen_t vendor_id,
enum_name_t *comp_func_names, int qualifier_type_size,
char *qualifier_flag_names, enum_name_t *qualifier_type_names)
{
METHOD(pts_component_manager_t, destroy, void,
private_pts_component_manager_t *this)
{
- this->list->destroy_function(this->list, (void *)vendor_entry_destroy);
+ this->list->destroy_function(this->list, (void *)vendor_entry_destroy);
free(this);
}
#include "components/pts_comp_func_name.h"
#include <library.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* UTF-8 encoding of the character used to delimiter the filename
#include "pts_file_meas.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
#include <sys/stat.h>
}
}
enumerator->destroy(enumerator);
-
+
if (!found)
{
DBG1(DBG_PTS, " no measurement found for '%s'", filename);
break;
}
}
- return success;
+ return success;
}
METHOD(pts_file_meas_t, destroy, void,
#include "pts_file_meta.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_pts_file_meta_t private_pts_file_meta_t;
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_tcg_pts_attr_file_meas_t private_tcg_pts_attr_file_meas_t;
/**
* File Measurement
* see section 3.19.2 of PTS Protocol: Binding to TNC IF-M Specification
- *
+ *
* 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* Attribute value
*/
chunk_t value;
-
+
/**
* Noskip flag
*/
bool noskip_flag;
-
+
/**
* PTS File Measurements
*/
char *filename;
chunk_t measurement;
bool first = TRUE;
-
+
if (this->value.ptr)
{
return;
chunk_t measurement, filename;
char buf[BUF_LEN];
status_t status = FAILED;
-
+
if (this->value.len < PTS_FILE_MEAS_SIZE)
{
DBG1(DBG_TNC, "insufficient data for PTS file measurement header");
reader->read_uint64(reader, &number_of_files);
reader->read_uint16(reader, &request_id);
reader->read_uint16(reader, &meas_len);
-
+
this->measurements = pts_file_meas_create(request_id);
-
+
while (number_of_files--)
{
if (!reader->read_data(reader, meas_len, &measurement))
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_tcg_pts_attr_req_func_comp_evid_t private_tcg_pts_attr_req_func_comp_evid_t;
*/
/**
- * Component Functional Name Structure
+ * Component Functional Name Structure
* (see section 5.1 of PTS Protocol: Binding to TNC IF-M Specification)
*
* 1 2 3
* | Component Functional Name |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
-
+
#define PTS_REQ_FUNC_COMP_EVID_SIZE 12
#define PTS_REQ_FUNC_COMP_FAMILY_MASK 0xC0
* Attribute value
*/
chunk_t value;
-
+
/**
* Noskip flag
*/
entry->flags = flags;
entry->depth = depth;
entry->name = pts_comp_func_name_create(vendor_id, name, qualifier);
-
+
this->list->insert_last(this->list, entry);
}
status = SUCCESS;
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
typedef struct private_tcg_pts_attr_file_meta_t private_tcg_pts_attr_file_meta_t;
/**
* Unix-Style File Metadata
* see section 3.17.3 of PTS Protocol: Binding to TNC IF-M Specification
- *
+ *
* 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* Attribute value
*/
chunk_t value;
-
+
/**
* Noskip flag
*/
bool noskip_flag;
-
+
/**
* PTS File Metadata
*/
enumerator_t *enumerator;
pts_file_metadata_t *entry;
u_int64_t number_of_files;
-
+
if (this->value.ptr)
{
return;
strlen(entry->filename)));
}
enumerator->destroy(enumerator);
-
+
this->value = chunk_clone(writer->get_buf(writer));
writer->destroy(writer);
}
u_int64_t owner, group;
chunk_t filename;
status_t status = FAILED;
-
+
if (this->value.len < PTS_FILE_META_SIZE)
{
DBG1(DBG_TNC, "insufficient data for PTS Unix-Style file metadata header");
reader->read_uint64(reader, &number_of_files);
this->metadata = pts_file_meta_create();
-
+
while (number_of_files--)
{
if (!reader->read_uint16(reader, &len))
DBG1(DBG_TNC, "insufficient data for filename");
goto end;
}
-
+
entry = malloc_thing(pts_file_metadata_t);
entry->type = type;
entry->filesize = filesize;
#include <debug.h>
#include <networking/host.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/condvar.h>
#include <threading/mutex.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_radius_config_t private_radius_config_t;
#include "simaka_manager.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_simaka_manager_t private_simaka_manager_t;
#include <crypto/hashers/hasher.h>
#include <utils/identification.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <plugins/plugin.h>
typedef struct simaka_manager_t simaka_manager_t;
#include "simaka_manager.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_simaka_message_t private_simaka_message_t;
typedef struct hdr_t hdr_t;
LOCAL_SRC_FILES := \
library.c chunk.c debug.c enum.c settings.c printf_hook.c \
asn1/asn1.c asn1/asn1_parser.c asn1/oid.c bio/bio_reader.c bio/bio_writer.c \
+collections/blocking_queue.c collections/enumerator.c collections/hashtable.c \
+collections/linked_list.c \
crypto/crypters/crypter.c crypto/hashers/hasher.c crypto/pkcs7.c crypto/pkcs9.c \
crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords_static.c \
crypto/prfs/prf.c crypto/prfs/mac_prf.c \
selectors/traffic_selector.c threading/thread.c threading/thread_value.c \
threading/mutex.c threading/semaphore.c threading/rwlock.c threading/spinlock.c \
utils.c utils/identification.c utils/lexparser.c \
-utils/linked_list.c utils/blocking_queue.c utils/hashtable.c utils/enumerator.c \
utils/optionsfrom.c utils/capabilities.c utils/backtrace.c
# adding the plugin source files
libstrongswan_la_SOURCES = \
library.c chunk.c debug.c enum.c settings.c printf_hook.c \
asn1/asn1.c asn1/asn1_parser.c asn1/oid.c bio/bio_reader.c bio/bio_writer.c \
+collections/blocking_queue.c collections/enumerator.c collections/hashtable.c \
+collections/linked_list.c \
crypto/crypters/crypter.c crypto/hashers/hasher.c crypto/pkcs7.c crypto/pkcs9.c \
crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords_static.c \
crypto/prfs/prf.c crypto/prfs/mac_prf.c \
selectors/traffic_selector.c threading/thread.c threading/thread_value.c \
threading/mutex.c threading/semaphore.c threading/rwlock.c threading/spinlock.c \
utils.c utils/identification.c utils/lexparser.c \
-utils/linked_list.c utils/blocking_queue.c utils/hashtable.c utils/enumerator.c \
utils/optionsfrom.c utils/capabilities.c utils/backtrace.c
if USE_DEV_HEADERS
nobase_strongswan_include_HEADERS = \
library.h chunk.h debug.h enum.h settings.h printf_hook.h \
asn1/asn1.h asn1/asn1_parser.h asn1/oid.h bio/bio_reader.h bio/bio_writer.h \
+collections/blocking_queue.h collections/enumerator.h collections/hashtable.h \
+collections/linked_list.h \
crypto/crypters/crypter.h crypto/hashers/hasher.h crypto/mac.h \
crypto/pkcs7.h crypto/pkcs9.h crypto/proposal/proposal_keywords.h \
crypto/proposal/proposal_keywords_static.h \
threading/mutex.h threading/condvar.h threading/spinlock.h threading/semaphore.h \
threading/rwlock.h threading/rwlock_condvar.h threading/lock_profiler.h \
utils.h utils/identification.h utils/lexparser.h \
-utils/linked_list.h utils/blocking_queue.h utils/hashtable.h utils/enumerator.h \
utils/optionsfrom.h utils/capabilities.h utils/backtrace.h \
utils/leak_detective.h integrity_checker.h
endif
#include <threading/mutex.h>
#include <threading/thread.h>
#include <threading/condvar.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_blocking_queue_t private_blocking_queue_t;
/**
* @defgroup blocking_queue blocking_queue
- * @{ @ingroup utils
+ * @{ @ingroup collections
*/
#ifndef BLOCKING_QUEUE_H_
/**
* @defgroup enumerator enumerator
- * @{ @ingroup utils
+ * @{ @ingroup collections
*/
#ifndef ENUMERATOR_H_
/**
* @defgroup hashtable hashtable
- * @{ @ingroup utils
+ * @{ @ingroup collections
*/
#ifndef HASHTABLE_H_
#define HASHTABLE_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct hashtable_t hashtable_t;
/**
* @defgroup linked_list linked_list
- * @{ @ingroup utils
+ * @{ @ingroup collections
*/
#ifndef LINKED_LIST_H_
typedef struct linked_list_t linked_list_t;
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/**
* Method to match elements in a linked list (used in find_* functions)
#include <library.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
#include <eap/eap.h>
#include <credentials/certificates/certificate.h>
#ifndef AUTH_CFG_H_
#define AUTH_CFG_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct auth_cfg_t auth_cfg_t;
typedef enum auth_rule_t auth_rule_t;
#ifndef PKCS10_H_
#define PKCS10_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <credentials/certificates/certificate.h>
typedef struct pkcs10_t pkcs10_t;
#ifndef X509_H_
#define X509_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <credentials/certificates/certificate.h>
/* constraints are currently restricted to the range 0..127 */
#include <stdint.h>
-#include <utils/linked_list.h>
-#include <utils/hashtable.h>
+#include <collections/linked_list.h>
+#include <collections/hashtable.h>
#include <threading/rwlock.h>
typedef struct private_cred_encoding_t private_cred_encoding_t;
#include "credential_factory.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/thread_value.h>
#include <threading/rwlock.h>
#include <credentials/certificates/x509.h>
#include <threading/thread_value.h>
#include <threading/mutex.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/sets/cert_cache.h>
#include <credentials/sets/auth_cfg_wrapper.h>
#include <credentials/certificates/x509.h>
typedef struct credential_manager_t credential_manager_t;
#include <utils/identification.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <credentials/auth_cfg.h>
#include <credentials/credential_set.h>
#include <credentials/keys/private_key.h>
#include <asn1/oid.h>
#include <asn1/asn1.h>
#include <asn1/asn1_parser.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/lexparser.h>
#include "ietf_attributes.h"
#ifndef SHARED_KEY_H_
#define SHARED_KEY_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <utils/identification.h>
typedef struct shared_key_t shared_key_t;
#include <library.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/** cache size, a power of 2 for fast modulo */
#define CACHE_SIZE 32
#include "mem_cred.h"
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_mem_cred_t private_mem_cred_t;
#include <credentials/credential_set.h>
#include <credentials/certificates/crl.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* Generic in-memory credential set.
#include <debug.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <crypto/crypto_tester.h>
const char *default_plugin_name = "default";
#include "crypto_tester.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_crypto_tester_t private_crypto_tester_t;
#include <crypto/pkcs9.h>
#include <crypto/hashers/hasher.h>
#include <crypto/crypters/crypter.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "pkcs7.h"
#include <credentials/keys/private_key.h>
#include <crypto/pkcs9.h>
#include <crypto/crypters/crypter.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/**
* PKCS#7 contentInfo object.
#include <asn1/oid.h>
#include <asn1/asn1.h>
#include <asn1/asn1_parser.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "pkcs9.h"
#include "proposal_keywords.h"
#include "proposal_keywords_static.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/rwlock.h>
typedef struct private_proposal_keywords_t private_proposal_keywords_t;
typedef enum db_driver_t db_driver_t;
typedef struct database_t database_t;
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/**
* Database column types
#include "database_factory.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
typedef struct private_database_factory_t private_database_factory_t;
#include <debug.h>
#include <threading/rwlock.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_fetcher_manager_t private_fetcher_manager_t;
#include <threading/thread.h>
#include <utils/identification.h>
#include <networking/host.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <utils/backtrace.h>
#include <selectors/traffic_selector.h>
* @defgroup bio bio
* @ingroup libstrongswan
*
+ * @defgroup collections collections
+ * @ingroup libstrongswan
+ *
* @defgroup credentials credentials
* @ingroup libstrongswan
*
#include <threading/condvar.h>
#include <threading/mutex.h>
#include <threading/thread.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
/**
* Default minimum and maximum number of threads
#include <debug.h>
#include <asn1/asn1.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/certificates/x509.h>
typedef struct private_constraints_validator_t private_constraints_validator_t;
#include <chunk.h>
#include <threading/thread_value.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/* Older mysql.h headers do not define it, but we need it. It is not returned
* in in MySQL 4 by default, but by MySQL 5. To avoid this problem, we catch
#include <openssl/x509v3.h>
#include <debug.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
#include <credentials/certificates/x509.h>
typedef struct private_openssl_crl_t private_openssl_crl_t;
#include <debug.h>
#include <asn1/oid.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_openssl_x509_t private_openssl_x509_t;
#include "pkcs11_manager.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_pkcs11_creds_t private_pkcs11_creds_t;
#include <library.h>
#include <debug.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_pkcs11_library_t private_pkcs11_library_t;
#include <enum.h>
#include <chunk.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/**
* Optional PKCS#11 features some libraries support, some not
#include "pkcs11_manager.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/thread.h>
#include "pkcs11_library.h"
#include <library.h>
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <threading/mutex.h>
#include <threading/rwlock.h>
#include <debug.h>
#include <library.h>
#include <integrity_checker.h>
-#include <utils/hashtable.h>
-#include <utils/linked_list.h>
+#include <collections/hashtable.h>
+#include <collections/linked_list.h>
#include <plugins/plugin.h>
typedef struct private_plugin_loader_t private_plugin_loader_t;
typedef struct plugin_loader_t plugin_loader_t;
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/* to avoid circular references we can't include plugin_feature.h */
struct plugin_feature_t;
#include <asn1/asn1.h>
#include <asn1/asn1_parser.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/certificates/x509.h>
#include <credentials/ietf_attributes/ietf_attributes.h>
#include <credentials/keys/private_key.h>
#include <asn1/asn1_parser.h>
#include <crypto/hashers/hasher.h>
#include <credentials/keys/private_key.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
#include <selectors/traffic_selector.h>
#include <asn1/asn1_parser.h>
#include <credentials/certificates/x509.h>
#include <credentials/keys/private_key.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
/**
* entry for a revoked certificate
#include <asn1/oid.h>
#include <asn1/asn1.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
#include <credentials/certificates/x509.h>
#include <credentials/keys/private_key.h>
#include <asn1/asn1.h>
#include <asn1/asn1_parser.h>
#include <utils/identification.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <debug.h>
#include <library.h>
#include <asn1/asn1.h>
#include <asn1/asn1_parser.h>
#include <credentials/keys/private_key.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
typedef struct private_x509_pkcs10_t private_x509_pkcs10_t;
#include <threading/condvar.h>
#include <threading/semaphore.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_callback_job_t private_callback_job_t;
#include <threading/condvar.h>
#include <threading/mutex.h>
#include <threading/thread_value.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_processor_t private_processor_t;
#include "traffic_selector.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <utils/identification.h>
#include <debug.h>
#include "settings.h"
#include "debug.h"
-#include "utils/linked_list.h"
+#include "collections/linked_list.h"
#include "threading/rwlock.h"
#define MAX_INCLUSION_LEVEL 10
typedef struct settings_t settings_t;
#include "utils.h"
-#include "utils/enumerator.h"
+#include "collections/enumerator.h"
/**
* Convert a string value returned by a key/value enumerator to a boolean.
#include <threading/thread_value.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include "thread.h"
#include "enum.h"
#include "debug.h"
-#include "utils/enumerator.h"
+#include "collections/enumerator.h"
ENUM(status_names, SUCCESS, NEED_MORE,
"SUCCESS",
#ifdef HAVE_BFD_H
#include <bfd.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
#include <threading/mutex.h>
/**
typedef enum id_part_t id_part_t;
#include <chunk.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
/**
* Matches returned from identification_t.match
#include <library.h>
#include <debug.h>
#include <utils/backtrace.h>
-#include <utils/hashtable.h>
+#include <collections/hashtable.h>
typedef struct private_leak_detective_t private_leak_detective_t;
#include "tls_alert.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
ENUM_BEGIN(tls_alert_desc_names, TLS_CLOSE_NOTIFY, TLS_CLOSE_NOTIFY,
"close notify",
#include "tls_cache.h"
#include <debug.h>
-#include <utils/linked_list.h>
-#include <utils/hashtable.h>
+#include <collections/linked_list.h>
+#include <collections/hashtable.h>
#include <threading/rwlock.h>
typedef struct private_tls_cache_t private_tls_cache_t;
#define GATEWAY_H_
#include <networking/host.h>
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct gateway_t gateway_t;
#include "gateway.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_manager_t private_manager_t;
#ifndef STORAGE_H_
#define STORAGE_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct storage_t storage_t;
#ifndef XML_H_
#define XML_H_
-#include <utils/enumerator.h>
+#include <collections/enumerator.h>
typedef struct xml_t xml_t;
#include <debug.h>
#include <asn1/asn1.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/certificates/certificate.h>
#include <credentials/certificates/x509.h>
#include <credentials/certificates/pkcs10.h>
#include "pki.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/certificates/certificate.h>
/**
#include "pki.h"
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/certificates/certificate.h>
#include <credentials/certificates/x509.h>
#include <asn1/asn1.h>
#include "pki.h"
#include <debug.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
#include <credentials/certificates/certificate.h>
#include <credentials/certificates/x509.h>
#include <credentials/certificates/crl.h>
#include <asn1/asn1.h>
#include <asn1/oid.h>
#include <utils/optionsfrom.h>
-#include <utils/enumerator.h>
-#include <utils/linked_list.h>
+#include <collections/enumerator.h>
+#include <collections/linked_list.h>
#include <crypto/hashers/hasher.h>
#include <crypto/crypters/crypter.h>
#include <crypto/proposal/proposal_keywords.h>