| 1 | /** |
| 2 | * @file oval_cmp_ip_address_impl.h |
| 3 | * \brief Open Vulnerability and Assessment Language |
| 4 | * |
| 5 | * See more details at http://oval.mitre.org/ |
| 6 | */ |
| 7 | |
| 8 | /* |
| 9 | * Copyright 2009--2013 Red Hat Inc., Durham, North Carolina. |
| 10 | * All Rights Reserved. |
| 11 | * |
| 12 | * This library is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU Lesser General Public |
| 14 | * License as published by the Free Software Foundation; either |
| 15 | * version 2.1 of the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This library is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 20 | * Lesser General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU Lesser General Public |
| 23 | * License along with this library; if not, write to the Free Software |
| 24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 25 | * |
| 26 | * Authors: |
| 27 | * Tomas Heinrich <[email protected]> |
| 28 | * Šimon Lukašík |
| 29 | */ |
| 30 | |
| 31 | #ifndef OSCAP_OVAL_IP_ADDRESS_IMPL_H_ |
| 32 | #define OSCAP_OVAL_IP_ADDRESS_IMPL_H_ |
| 33 | |
| 34 | #include "common/util.h" |
| 35 | |
| 36 | #include "oval_definitions.h" |
| 37 | #include "oval_types.h" |
| 38 | |
| 39 | |
| 40 | /** |
| 41 | * Compare two IP address or address sets (CIDR). The format of input string |
| 42 | * shall conform to ipv4_address types from oval:SimpleDatatypeEnumeration. |
| 43 | * This operation is not commutative, be aware of the order of operands. |
| 44 | * @param af Internet address family (AF_INET or AF_INET6) |
| 45 | * @param s1 ipv4 address as defined by state element |
| 46 | * @param s2 ipv4 address as captured from system (from syschar object) |
| 47 | * @param op type of comparison operation |
| 48 | * @returns result of comparison as defined by OVAL specification |
| 49 | */ |
| 50 | oval_result_t oval_ipaddr_cmp(int af, const char *s1, const char *s2, oval_operation_t op); |
| 51 | |
| 52 | |
| 53 | #endif |