/**
* The Sender-Thread.
- */
+ */
sender_t *sender;
/**
* private_auth_payload_t.
*/
encoding_rule_t auth_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_auth_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_auth_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
/* Length of the whole payload*/
{ PAYLOAD_LENGTH, offsetof(private_auth_payload_t, payload_length)},
- /* 1 Byte AUTH type*/
+ /* 1 Byte AUTH type*/
{ U_INT_8, offsetof(private_auth_payload_t, auth_method) },
/* 3 reserved bytes */
{ RESERVED_BYTE, 0 },
*
*/
encoding_rule_t cert_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_cert_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_cert_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
/* Length of the whole payload*/
{ PAYLOAD_LENGTH, offsetof(private_cert_payload_t, payload_length)},
- /* 1 Byte CERT type*/
+ /* 1 Byte CERT type*/
{ U_INT_8, offsetof(private_cert_payload_t, encoding) },
/* some cert data bytes, length is defined in PAYLOAD_LENGTH */
{ CERT_DATA, offsetof(private_cert_payload_t, data) }
*
*/
encoding_rule_t cp_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_cp_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_cp_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
*/
encoding_rule_t delete_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_delete_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_delete_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
*/
encoding_rule_t eap_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_eap_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_eap_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
* When generating it must be changed from host to network order.
* The value is read from the associated data struct.
- * The current write position is moved 16 bit forward afterwards.
+ * The current write position is moved 16 bit forward afterwards.
*
* When parsing it must be changed from network to host order.
* The value is written to the associated data struct.
/**
* Representating a length field of a payload.
*
- * When generating it must be changed from host to network order.
+ * When generating it must be changed from host to network order.
* The value is read from the associated data struct.
* The current write position is moved 16 bit forward afterwards.
*
/**
* Representating a length field of a header.
*
- * When generating it must be changed from host to network order.
+ * When generating it must be changed from host to network order.
* The value is read from the associated data struct.
* The current write position is moved 32 bit forward afterwards.
*
/**
* Representating a spi size field.
*
- * When generating it must be changed from host to network order.
+ * When generating it must be changed from host to network order.
* The value is read from the associated data struct.
* The current write position is moved 8 bit forward afterwards.
*
/**
* Representating a spi field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing SPI_SIZE bytes are read and written into the chunk pointing to.
*/
/**
* Representating a Key Exchange Data field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 8) bytes are read and written into the chunk pointing to.
*/
/**
* Representating a Notification field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - spi size - 8) bytes are read and written into the chunk pointing to.
*/
/**
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 4) bytes are read and written into the chunk pointing to.
*/
*
* When generating it must be changed from host to network order.
* The value is read from the associated data struct.
- * The current write position is moved 15 bit forward afterwards.
+ * The current write position is moved 15 bit forward afterwards.
*
* When parsing it must be changed from network to host order.
* The value is written to the associated data struct.
*
* When generating it must be changed from host to network order.
* The value is read from the associated data struct.
- * The current write position is moved 16 bit forward afterwards.
+ * The current write position is moved 16 bit forward afterwards.
*
* When parsing it must be changed from network to host order.
* The value is written to the associated data struct.
*
* When generating it must be changed from host to network order.
* The value is read from the associated data struct.
- * The current write position is moved 16 bit forward afterwards.
+ * The current write position is moved 16 bit forward afterwards.
*
* When parsing it must be changed from network to host order.
* The value is written to the associated data struct.
* this field is available or missing and so parsed/generated
* or not parsed/not generated.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing SPI_SIZE bytes are read and written into the chunk pointing to.
*/
*
* When generating it must be changed from host to network order.
* The value is read from the associated data struct.
- * The current write position is moved 16 bit forward afterwards.
+ * The current write position is moved 16 bit forward afterwards.
*
* When parsing it must be changed from network to host order.
* The value is written to the associated data struct.
* Depending on the last field of type TS_TYPE
* this field is either 4 or 16 byte long.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing 4 or 16 bytes are read and written into the chunk pointing to.
*/
/**
* Representating a Nonce Data field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 4) bytes are read and written into the chunk pointing to.
*/
/**
* Representating a ID Data field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 8) bytes are read and written into the chunk pointing to.
*/
/**
* Representating a AUTH Data field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 8) bytes are read and written into the chunk pointing to.
*/
/**
* Representating a CERT Data field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 5) bytes are read and written into the chunk pointing to.
*/
/**
* Representating a CERTREQ Data field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 5) bytes are read and written into the chunk pointing to.
*/
/**
* Representating an EAP message field.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 4) bytes are read and written into the chunk pointing to.
*/
/**
* Representating the SPIS field in a DELETE payload.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 8) bytes are read and written into the chunk pointing to.
*/
/**
* Representating the VID DATA field in a VENDOR ID payload.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 4) bytes are read and written into the chunk pointing to.
*/
/**
* Representating the DATA of an unknown payload.
*
- * When generating the content of the chunkt pointing to
- * is written.
+ * When generating the content of the chunkt pointing to
+ * is written.
*
* When parsing (Payload Length - 4) bytes are read and written into the chunk pointing to.
*/
/**
* Representating an IKE_SPI field in an IKEv2 Header.
*
- * When generating the value of the u_int64_t pointing to
- * is written (host and networ order is not changed).
+ * When generating the value of the u_int64_t pointing to
+ * is written (host and networ order is not changed).
*
* When parsing 8 bytes are read and written into the u_int64_t pointing to.
*/
*
*/
encoding_rule_t id_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_id_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_id_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
/* Length of the whole payload*/
{ PAYLOAD_LENGTH, offsetof(private_id_payload_t, payload_length) },
- /* 1 Byte ID type*/
+ /* 1 Byte ID type*/
{ U_INT_8, offsetof(private_id_payload_t, id_type) },
/* 3 reserved bytes */
{ RESERVED_BYTE, 0 },
* ike_header_t.
*/
encoding_rule_t ike_header_encodings[] = {
- /* 8 Byte SPI, stored in the field initiator_spi */
+ /* 8 Byte SPI, stored in the field initiator_spi */
{ IKE_SPI, offsetof(private_ike_header_t, initiator_spi) },
- /* 8 Byte SPI, stored in the field responder_spi */
+ /* 8 Byte SPI, stored in the field responder_spi */
{ IKE_SPI, offsetof(private_ike_header_t, responder_spi) },
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_ike_header_t, next_payload) },
- /* 4 Bit major version, stored in the field maj_version */
+ /* 4 Bit major version, stored in the field maj_version */
{ U_INT_4, offsetof(private_ike_header_t, maj_version) },
- /* 4 Bit minor version, stored in the field min_version */
+ /* 4 Bit minor version, stored in the field min_version */
{ U_INT_4, offsetof(private_ike_header_t, min_version) },
/* 8 Bit for the exchange type */
{ U_INT_8, offsetof(private_ike_header_t, exchange_type) },
- /* 2 Bit reserved bits, nowhere stored */
+ /* 2 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
- /* 3 Bit flags, stored in the fields response, version and initiator */
+ /* 3 Bit flags, stored in the fields response, version and initiator */
{ FLAG, offsetof(private_ike_header_t, flags.response) },
{ FLAG, offsetof(private_ike_header_t, flags.version) },
{ FLAG, offsetof(private_ike_header_t, flags.initiator) },
- /* 3 Bit reserved bits, nowhere stored */
+ /* 3 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
- /* 4 Byte message id, stored in the field message_id */
+ /* 4 Byte message id, stored in the field message_id */
{ U_INT_32, offsetof(private_ike_header_t, message_id) },
- /* 4 Byte length fied, stored in the field length */
+ /* 4 Byte length fied, stored in the field length */
{ HEADER_LENGTH, offsetof(private_ike_header_t, length) }
};
*
*/
encoding_rule_t ke_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_ke_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_ke_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
*/
encoding_rule_t nonce_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_nonce_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_nonce_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
*/
encoding_rule_t notify_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_notify_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_notify_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
/**
* SPI size of the following SPI.
*/
- u_int8_t spi_size;
+ u_int8_t spi_size;
/**
* Number of transforms.
*/
- u_int8_t transforms_count;
+ u_int8_t transforms_count;
- /**
- * SPI is stored as chunk.
- */
- chunk_t spi;
+ /**
+ * SPI is stored as chunk.
+ */
+ chunk_t spi;
- /**
- * Transforms are stored in a linked_list_t.
- */
+ /**
+ * Transforms are stored in a linked_list_t.
+ */
linked_list_t * transforms;
};
* private_proposal_substructure_t.
*/
encoding_rule_t proposal_substructure_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_proposal_substructure_t, next_payload) },
/* Reserved Byte is skipped */
{ RESERVED_BYTE, 0 },
*
*/
encoding_rule_t sa_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_sa_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_sa_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
*/
encoding_rule_t traffic_selector_substructure_encodings[] = {
- /* 1 Byte next ts type*/
+ /* 1 Byte next ts type*/
{ TS_TYPE, offsetof(private_traffic_selector_substructure_t, ts_type) },
- /* 1 Byte IP protocol id*/
+ /* 1 Byte IP protocol id*/
{ U_INT_8, offsetof(private_traffic_selector_substructure_t, ip_protocol_id) },
/* Length of the whole payload*/
{ PAYLOAD_LENGTH, offsetof(private_traffic_selector_substructure_t, payload_length) },
- /* 2 Byte start port*/
+ /* 2 Byte start port*/
{ U_INT_16, offsetof(private_traffic_selector_substructure_t, start_port) },
- /* 2 Byte end port*/
+ /* 2 Byte end port*/
{ U_INT_16, offsetof(private_traffic_selector_substructure_t, end_port) },
/* starting address is either 4 or 16 byte */
{ ADDRESS, offsetof(private_traffic_selector_substructure_t, starting_address) },
*/
u_int16_t transform_id;
- /**
+ /**
* Transforms Attributes are stored in a linked_list_t.
*/
linked_list_t *attributes;
*
*/
encoding_rule_t transform_substructure_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_transform_substructure_t, next_payload) },
/* Reserved Byte is skipped */
{ RESERVED_BYTE, 0 },
*
*/
encoding_rule_t ts_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_ts_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_ts_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
/* Length of the whole payload*/
{ PAYLOAD_LENGTH, offsetof(private_ts_payload_t, payload_length)},
- /* 1 Byte TS type*/
+ /* 1 Byte TS type*/
{ U_INT_8, offsetof(private_ts_payload_t, number_of_traffic_selectors) },
/* 3 reserved bytes */
{ RESERVED_BYTE, 0 },
*
*/
encoding_rule_t unknown_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_unknown_payload_t, next_payload)},
/* the critical bit */
{ FLAG, offsetof(private_unknown_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
*
*/
encoding_rule_t vendor_id_payload_encodings[] = {
- /* 1 Byte next payload type, stored in the field next_payload */
+ /* 1 Byte next payload type, stored in the field next_payload */
{ U_INT_8, offsetof(private_vendor_id_payload_t, next_payload) },
/* the critical bit */
{ FLAG, offsetof(private_vendor_id_payload_t, critical) },
- /* 7 Bit reserved bits, nowhere stored */
+ /* 7 Bit reserved bits, nowhere stored */
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
{ RESERVED_BIT, 0 },
* Whenever the sender thread thinks it's good to send the packet,
* it'll do so.
*
- * @param packet packet to send
+ * @param packet packet to send
*/
void (*send) (sender_t *this, packet_t *packet);
DBG1(DBG_IKE, "received AKA notification 'general "
"failure' (%d)", code);
return FAILED;
- case 32768:
+ case 32768:
DBG1(DBG_IKE, "received AKA notification 'successfully "
"authenticated' (%d)", code);
continue;
- case 1026:
+ case 1026:
DBG1(DBG_IKE, "received AKA notification 'access "
"temporarily denied' (%d)", code);
return FAILED;
- case 1031:
+ case 1031:
DBG1(DBG_IKE, "received AKA notification 'not "
"subscribed to service' (%d)", code);
return FAILED;
}
rng->allocate_bytes(rng, NONCE_LEN, &this->nonce);
rng->destroy(rng);
- break;
+ break;
default:
free(this);
return NULL;
identification_t *imsi;
/**
- * source of triplets
- */
+ * source of triplets
+ */
eap_sim_file_triplets_t *triplets;
};
eap_sim_file_provider_t public;
/**
- * source of triplets
- */
+ * source of triplets
+ */
eap_sim_file_triplets_t *triplets;
};
{
sockaddr_t *host_addr = host->get_sockaddr(host);
socklen_t *len = host->get_sockaddr_len(host);
- memcpy((char*)(ext + 1), host_addr, *len);
- ext->sadb_address_len = PFKEY_LEN(sizeof(*ext) + *len);
+ memcpy((char*)(ext + 1), host_addr, *len);
+ ext->sadb_address_len = PFKEY_LEN(sizeof(*ext) + *len);
}
/**
addr->sadb_address_exttype = type;
sockaddr_t *saddr = (sockaddr_t*)(addr + 1);
saddr->sa_family = family;
- addr->sadb_address_len = PFKEY_LEN(sizeof(*addr) + len);
+ addr->sadb_address_len = PFKEY_LEN(sizeof(*addr) + len);
PFKEY_EXT_ADD(msg, addr);
}
{
lifetime_cfg_t lft = {{0,0,0},{0,0,0},{0,0,0}};
add_sa(this, src, dst, htonl(ntohs(cpi)), IPPROTO_COMP, reqid, &lft,
- ENCR_UNDEFINED, chunk_empty, AUTH_UNDEFINED, chunk_empty,
- mode, ipcomp, 0, FALSE, inbound);
+ ENCR_UNDEFINED, chunk_empty, AUTH_UNDEFINED, chunk_empty,
+ mode, ipcomp, 0, FALSE, inbound);
ipcomp = IPCOMP_NONE;
}
char *pool;
/**
- * IKE proposal
- */
+ * IKE proposal
+ */
proposal_t *proposal;
/**
certificate_t *cert;
/**
- * User name
- */
- identification_t *user;
+ * User name
+ */
+ identification_t *user;
/**
* User password
*
* This function is non blocking and adds a job_t to the queue.
*
- * @param job job to add to the queue
+ * @param job job to add to the queue
*/
void (*queue_job) (processor_t *this, job_t *job);
ipsec_mode_t mode;
/**
- * selected proposal
- */
- proposal_t *proposal;
+ * selected proposal
+ */
+ proposal_t *proposal;
/**
* config used to create this child
check_list_t *checklist, endpoint_pair_t *pair)
{
DBG2(DBG_IKE, "queueing triggered check for pair '%d'", pair->id);
- pair->state = CHECK_WAITING;
- checklist->triggered->insert_last(checklist->triggered, pair);
-
- if (!checklist->sender)
- {
- /* if the sender is not running we restart it */
- schedule_checks(this, checklist, ME_INTERVAL);
- }
+ pair->state = CHECK_WAITING;
+ checklist->triggered->insert_last(checklist->triggered, pair);
+
+ if (!checklist->sender)
+ {
+ /* if the sender is not running we restart it */
+ schedule_checks(this, checklist, ME_INTERVAL);
+ }
}
/**
*
* Two ike_sa_id_t objects are equal if both SPI values and the role matches.
*
- * @param other ike_sa_id_t object to check if equal
- * @return TRUE if given ike_sa_id_t are equal, FALSE otherwise
+ * @param other ike_sa_id_t object to check if equal
+ * @return TRUE if given ike_sa_id_t are equal, FALSE otherwise
*/
bool (*equals) (ike_sa_id_t *this, ike_sa_id_t *other);
*
* After calling this function, both objects are equal.
*
- * @param other ike_sa_id_t object from which values will be taken
+ * @param other ike_sa_id_t object from which values will be taken
*/
void (*replace_values) (ike_sa_id_t *this, ike_sa_id_t *other);
keymat_t public;
/**
- * IKE_SA Role, initiator or responder
- */
- bool initiator;
+ * IKE_SA Role, initiator or responder
+ */
+ bool initiator;
/**
* inbound signer (verify)
/* Dumm menu */
menu = gtk_menu_new();
- dummMenu = gtk_menu_item_new_with_mnemonic("_Dumm");
+ dummMenu = gtk_menu_item_new_with_mnemonic("_Dumm");
gtk_menu_bar_append(GTK_MENU_BAR(menubar), dummMenu);
gtk_widget_show(dummMenu);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(dummMenu), menu);
/* Guest menu */
menu = gtk_menu_new();
- guestMenu = gtk_menu_item_new_with_mnemonic("_Guest");
+ guestMenu = gtk_menu_item_new_with_mnemonic("_Guest");
gtk_menu_bar_append(GTK_MENU_BAR(menubar), guestMenu);
gtk_widget_show(guestMenu);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(guestMenu), menu);
/* Switch menu */
menu = gtk_menu_new();
- switchMenu = gtk_menu_item_new_with_mnemonic("_Switch");
+ switchMenu = gtk_menu_item_new_with_mnemonic("_Switch");
gtk_menu_bar_append(GTK_MENU_BAR(menubar), switchMenu);
gtk_widget_show(switchMenu);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(switchMenu), menu);
gtk_widget_set_sensitive(menuitem, FALSE);
gtk_widget_show(menuitem);
- /* show widgets */
+ /* show widgets */
gtk_widget_show(menubar);
gtk_widget_show(notebook);
gtk_widget_show(vbox);
sa_family_t nl_family; /* AF_NETLINK */
unsigned short nl_pad; /* zero */
__u32 nl_pid; /* process pid */
- __u32 nl_groups; /* multicast groups mask */
+ __u32 nl_groups; /* multicast groups mask */
};
struct nlmsghdr
#define RTA_PUT(skb, attrtype, attrlen, data) \
({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
goto rtattr_failure; \
- __rta_fill(skb, attrtype, attrlen, data); })
+ __rta_fill(skb, attrtype, attrlen, data); })
#define RTA_APPEND(skb, attrlen, data) \
({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \
#define __RTA_PUT(skb, attrtype, attrlen) \
({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
goto rtattr_failure; \
- __rta_reserve(skb, attrtype, attrlen); })
+ __rta_reserve(skb, attrtype, attrlen); })
extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change);
struct inet_sock inet;
int pending; /* Any pending frames ? */
unsigned int corkflag; /* Cork is required */
- __u16 encap_type; /* Is this an Encapsulation socket? */
+ __u16 encap_type; /* Is this an Encapsulation socket? */
/*
* Following member retains the infomation to create a UDP header
* when the socket is uncorked.
dispatcher_t *dispatcher;
your_global_context_implementation_t *global;
- global = initialize_your_global_context();
+ global = initialize_your_global_context();
- dispatcher = dispatcher_create(NULL, FALSE, 180,
+ dispatcher = dispatcher_create(NULL, FALSE, 180,
(context_constructor_t)your_session_context_create, global);
dispatcher->add_controller(dispatcher, your_controller1_create, param1);
dispatcher->add_controller(dispatcher, your_controller2_create, param2);
{"1:2::3:4", 'Q', "1:2:0:0:0:0:3:4"},
{"1:2:0:0:3:4:0:0", 0, "1:2::3:4:0:0"},
{"1.2.3.4", 'r' , "4.3.2.1.IN-ADDR.ARPA."},
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f */
{"1:2::3:4", 'r', "4.0.0.0.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.1.0.0.0.IP6.ARPA."},
{NULL, 0, NULL}
};
{
memcpy(pos, attribute->encoding.ptr, attribute->encoding.len);
pos += attribute->encoding.len;
- }
+ }
iterator->destroy(iterator);
}
}
chunk_t em;
u_char *pos;
int padding, i;
- rng_t *rng;
+ rng_t *rng;
rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK);
if (rng == NULL)
/* number of pseudo-random padding octets */
padding = this->k - plain.len - 3;
- if (padding < MIN_PS_PADDING)
+ if (padding < MIN_PS_PADDING)
{
DBG1("pseudo-random padding must be at least %d octets", MIN_PS_PADDING);
return FALSE;
for (i = 0, j = 0; j < len; i++, j += 4)
{
- output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
+ output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
(((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
}
}
for (i = 0, j = 0; j < len; i++, j += 4)
{
- output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
+ output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
(((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
}
}
int i, num_locks;
CRYPTO_set_id_callback(id_function);
- CRYPTO_set_locking_callback(locking_function);
+ CRYPTO_set_locking_callback(locking_function);
CRYPTO_set_dynlock_create_callback(create_function);
CRYPTO_set_dynlock_lock_callback(lock_function);
result = FALSE;
break;
}
- }
+ }
iterator_a->destroy(iterator_a);
iterator_b->destroy(iterator_b);
}
break;
default:
break;
- }
+ }
}
iterator->destroy(iterator);
}
struct kv_t {
/**
- * key string, relative
- */
+ * key string, relative
+ */
char *key;
/**
*
* E.g.:
* @code
- a = b
- section-one {
- somevalue = asdf
- subsection {
- othervalue = xxx
- }
- yetanother = zz
- }
- section-two {
- }
- @endcode
+ a = b
+ section-one {
+ somevalue = asdf
+ subsection {
+ othervalue = xxx
+ }
+ yetanother = zz
+ }
+ section-two {
+ }
+ @endcode
*
* The values are accesses using the get() functions using dotted keys, e.g.
* section-one.subsection.othervalue
CERT_SEND_IF_ASKED = 1,
CERT_NEVER_SEND = 2,
- CERT_YES_SEND = 3, /* synonym for CERT_ALWAYS_SEND */
+ CERT_YES_SEND = 3, /* synonym for CERT_ALWAYS_SEND */
CERT_NO_SEND = 4 /* synonym for CERT_NEVER_SEND */
} certpolicy_t;
return OAKLEY_CAMELLIA_CBC;
case ENCR_SERPENT_CBC:
return OAKLEY_SERPENT_CBC;
- case ENCR_TWOFISH_CBC:
+ case ENCR_TWOFISH_CBC:
return OAKLEY_TWOFISH_CBC;
default:
return 0;
return ESP_CAMELLIA;
case ENCR_SERPENT_CBC:
return ESP_SERPENT;
- case ENCR_TWOFISH_CBC:
+ case ENCR_TWOFISH_CBC:
return ESP_TWOFISH;
default:
return 0;
crypter->decrypt(crypter, data, iv, NULL);
crypter->destroy(crypter);
- memcpy(st->st_new_iv, new_iv, crypter_block_size);
+ memcpy(st->st_new_iv, new_iv, crypter_block_size);
if (restore_iv)
{
memcpy(st->st_new_iv, new_iv, new_iv_len);
{
return FALSE;
}
- hasher->get_hash(hasher, cert->issuer, digest);
+ hasher->get_hash(hasher, cert->issuer, digest);
hasher->destroy(hasher);
location->next = NULL;
{
return chunk_empty;
}
- hasher->get_hash(hasher, tbs, digest_buf);
+ hasher->get_hash(hasher, tbs, digest_buf);
hasher->destroy(hasher);
/* according to PKCS#1 v2.1 digest must be packaged into
" [--debug-private]"
" [--debug-natt]"
#endif
- " \\\n\t"
+ " \\\n\t"
"[--nat_traversal] [--keep_alive <delay_sec>]"
" \\\n\t"
"[--force_keepalive] [--disable_port_floating]"
chunk_t serialNumber;
/* signature */
int sigAlg;
- chunk_t issuer;
+ chunk_t issuer;
/* validity */
time_t notBefore;
time_t notAfter;
{
private_key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
BUILD_KEY_SIZE, rsa_keylength,
- BUILD_END);
+ BUILD_END);
}
if (private_key == NULL)
{