diff options
author | René Mayrhofer <rene@mayrhofer.eu.org> | 2011-05-19 13:41:58 +0200 |
---|---|---|
committer | René Mayrhofer <rene@mayrhofer.eu.org> | 2011-05-19 13:41:58 +0200 |
commit | b590992f735393c97489fce191e7810eaae4f6d7 (patch) | |
tree | 286595c4aa43dbf3d616d816e5fade6ac364771a /src/libcharon/encoding/payloads/configuration_attribute.c | |
parent | 2fce29055b7b5bc2860d503d1ae822931f80b7aa (diff) | |
parent | 0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff) | |
download | vyos-strongswan-b590992f735393c97489fce191e7810eaae4f6d7.tar.gz vyos-strongswan-b590992f735393c97489fce191e7810eaae4f6d7.zip |
Merge upstream version 4.5.2
Diffstat (limited to 'src/libcharon/encoding/payloads/configuration_attribute.c')
-rw-r--r-- | src/libcharon/encoding/payloads/configuration_attribute.c | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/src/libcharon/encoding/payloads/configuration_attribute.c b/src/libcharon/encoding/payloads/configuration_attribute.c index 1ef8be800..e608497bd 100644 --- a/src/libcharon/encoding/payloads/configuration_attribute.c +++ b/src/libcharon/encoding/payloads/configuration_attribute.c @@ -1,10 +1,6 @@ /* -<<<<<<< HEAD - * Copyright (C) 2005-2009 Martin Willi -======= * Copyright (C) 2005-2010 Martin Willi * Copyright (C) 2010 revosec AG ->>>>>>> upstream/4.5.1 * Copyright (C) 2005 Jan Hutter * Hochschule fuer Technik Rapperswil * @@ -27,37 +23,24 @@ #include <library.h> #include <daemon.h> -<<<<<<< HEAD - -======= ->>>>>>> upstream/4.5.1 typedef struct private_configuration_attribute_t private_configuration_attribute_t; /** * Private data of an configuration_attribute_t object. -<<<<<<< HEAD - * - */ -struct private_configuration_attribute_t { -======= */ struct private_configuration_attribute_t { ->>>>>>> upstream/4.5.1 /** * Public configuration_attribute_t interface. */ configuration_attribute_t public; /** -<<<<<<< HEAD -======= * Reserved bit */ bool reserved; /** ->>>>>>> upstream/4.5.1 * Type of the attribute. */ u_int16_t type; @@ -80,13 +63,8 @@ struct private_configuration_attribute_t { * private_configuration_attribute_t. */ encoding_rule_t configuration_attribute_encodings[] = { -<<<<<<< HEAD - - { RESERVED_BIT, 0 }, -======= /* 1 reserved bit */ { RESERVED_BIT, offsetof(private_configuration_attribute_t, reserved)}, ->>>>>>> upstream/4.5.1 /* type of the attribute as 15 bit unsigned integer */ { ATTRIBUTE_TYPE, offsetof(private_configuration_attribute_t, type) }, /* Length of attribute value */ @@ -107,15 +85,8 @@ encoding_rule_t configuration_attribute_encodings[] = { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ -<<<<<<< HEAD -/** - * Implementation of payload_t.verify. - */ -static status_t verify(private_configuration_attribute_t *this) -======= METHOD(payload_t, verify, status_t, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { bool failed = FALSE; @@ -183,22 +154,6 @@ METHOD(payload_t, verify, status_t, return SUCCESS; } -<<<<<<< HEAD -/** - * Implementation of payload_t.get_encoding_rules. - */ -static void get_encoding_rules(private_configuration_attribute_t *this, - encoding_rule_t **rules, size_t *rule_count) -{ - *rules = configuration_attribute_encodings; - *rule_count = sizeof(configuration_attribute_encodings) / sizeof(encoding_rule_t); -} - -/** - * Implementation of payload_t.get_type. - */ -static payload_type_t get_type(private_configuration_attribute_t *this) -======= METHOD(payload_t, get_encoding_rules, void, private_configuration_attribute_t *this, encoding_rule_t **rules, size_t *rule_count) @@ -209,38 +164,16 @@ METHOD(payload_t, get_encoding_rules, void, METHOD(payload_t, get_type, payload_type_t, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { return CONFIGURATION_ATTRIBUTE; } -<<<<<<< HEAD -/** - * Implementation of payload_t.get_next_type. - */ -static payload_type_t get_next_type(private_configuration_attribute_t *this) -======= METHOD(payload_t, get_next_type, payload_type_t, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { return NO_PAYLOAD; } -<<<<<<< HEAD -/** - * Implementation of payload_t.set_next_type. - */ -static void set_next_type(private_configuration_attribute_t *this, - payload_type_t type) -{ -} - -/** - * Implementation of configuration_attribute_t.get_length. - */ -static size_t get_length(private_configuration_attribute_t *this) -======= METHOD(payload_t, set_next_type, void, private_configuration_attribute_t *this, payload_type_t type) { @@ -248,47 +181,24 @@ METHOD(payload_t, set_next_type, void, METHOD(payload_t, get_length, size_t, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { return this->value.len + CONFIGURATION_ATTRIBUTE_HEADER_LENGTH; } -<<<<<<< HEAD -/** - * Implementation of configuration_attribute_t.get_type. - */ -static configuration_attribute_type_t get_configuration_attribute_type( - private_configuration_attribute_t *this) -======= METHOD(configuration_attribute_t, get_cattr_type, configuration_attribute_type_t, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { return this->type; } -<<<<<<< HEAD -/** - * Implementation of configuration_attribute_t.get_value. - */ -static chunk_t get_value(private_configuration_attribute_t *this) -======= METHOD(configuration_attribute_t, get_value, chunk_t, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { return this->value; } -<<<<<<< HEAD -/** - * Implementation of configuration_attribute_t.destroy and payload_t.destroy. - */ -static void destroy(private_configuration_attribute_t *this) -======= METHOD2(payload_t, configuration_attribute_t, destroy, void, private_configuration_attribute_t *this) ->>>>>>> upstream/4.5.1 { free(this->value.ptr); free(this); @@ -301,25 +211,6 @@ configuration_attribute_t *configuration_attribute_create() { private_configuration_attribute_t *this; -<<<<<<< HEAD - this = malloc_thing(private_configuration_attribute_t); - this->public.payload_interface.verify = (status_t(*)(payload_t *))verify; - this->public.payload_interface.get_encoding_rules = (void(*)(payload_t *, encoding_rule_t **, size_t *) )get_encoding_rules; - this->public.payload_interface.get_length = (size_t(*)(payload_t *))get_length; - this->public.payload_interface.get_next_type = (payload_type_t(*)(payload_t *))get_next_type; - this->public.payload_interface.set_next_type = (void(*)(payload_t *,payload_type_t))set_next_type; - this->public.payload_interface.get_type = (payload_type_t(*)(payload_t *))get_type; - this->public.payload_interface.destroy = (void(*)(payload_t*))destroy; - - this->public.get_value = (chunk_t(*)(configuration_attribute_t *))get_value; - this->public.get_type = (configuration_attribute_type_t(*)(configuration_attribute_t *))get_configuration_attribute_type; - this->public.destroy = (void (*)(configuration_attribute_t*))destroy; - - this->type = 0; - this->value = chunk_empty; - this->length = 0; - -======= INIT(this, .public = { .payload_interface = { @@ -336,7 +227,6 @@ configuration_attribute_t *configuration_attribute_create() .destroy = _destroy, }, ); ->>>>>>> upstream/4.5.1 return &this->public; } |