From: Martin Willi Date: Thu, 31 Jan 2013 14:29:43 +0000 (+0100) Subject: Add a comparison function for pen_type_t X-Git-Tag: 5.0.3dr2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d03b338487d2bcc1c86f22e1bce6dbc26591624e;p=thirdparty%2Fstrongswan.git Add a comparison function for pen_type_t --- diff --git a/src/libstrongswan/pen/pen.h b/src/libstrongswan/pen/pen.h index 0edff61997..52123f855b 100644 --- a/src/libstrongswan/pen/pen.h +++ b/src/libstrongswan/pen/pen.h @@ -73,6 +73,18 @@ static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t type) return pen_type; } +/** + * Check two pen_type_t for equality. + * + * @param a first pen_type_t to compare + * @param b second pen_type_t to compare + * @return TRUE if a == b + */ +static inline bool pen_type_equals(pen_type_t a, pen_type_t b) +{ + return a.vendor_id == b.vendor_id && a.type == b.type; +} + /** * enum names for pen_t. */