diff options
author | Martin Willi <martin@revosec.ch> | 2013-01-31 15:29:43 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-02-14 17:17:22 +0100 |
commit | d03b338487d2bcc1c86f22e1bce6dbc26591624e (patch) | |
tree | 4a019d07607d52e0e48f4a17d79ad45b0cbc898b /src | |
parent | 9db54bbcd49083ea9a28612c307b15f65580e0d2 (diff) | |
download | strongswan-d03b338487d2bcc1c86f22e1bce6dbc26591624e.tar.bz2 strongswan-d03b338487d2bcc1c86f22e1bce6dbc26591624e.tar.xz |
Add a comparison function for pen_type_t
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/pen/pen.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstrongswan/pen/pen.h b/src/libstrongswan/pen/pen.h index 0edff6199..52123f855 100644 --- a/src/libstrongswan/pen/pen.h +++ b/src/libstrongswan/pen/pen.h @@ -74,6 +74,18 @@ static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t 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. */ extern enum_name_t *pen_names; |