tfSadbRecordClearByPriority
Table of Contents >> IPsec/IKE Programmer's Reference >> IPsec/IKE Function Reference
| #include <trsocket.h> |
| int tfSadbRecordClearByPriority | ( |
| ttUser16Bit priority, | |
| ttUser16Bit options | |
| ); |
Function Description
This function is used to remove all IPsec SAs associated with an IPsec Policy. The IPsec Policy is specified by the Priority to which it is assigned.
Usage
Call this function to clear all existing IPsec SAs associated with the given IPsec Policy. The IPsec Policy is specified by the priority to which it is assigned. In some cases, it is necessary to delete all automatic IPsec SAs and leave all manual IPsec SAs active. In this case, the options parameter is set to TM_IPSEC_CLEAR_MANUAL_SAS, else it should be set to TM_16BIT_ZERO.
Parameters
- priority
- This is set to the priority to which the IPsec Policy of interest is assigned.
- options
- This field is set to determine whether or not manual IPsec SAs should be removed or left active. When this field is TM_16BIT_ZERO, manual IPsec SAs are not removed. When this field is TM_IPSEC_CLEAR_MANUAL_SAS, manual IPsec SAs are removed as well.
Returns
- TM_ENOERROR
- This indicates success.
- TM_EIPSECNOTSTARTED
- This indicates failure because IPsec has not been started.
- TM_ENOENT
- This indicates failure because the kernel did not have any IPsec Policies defined.
- TM_EINVAL
- This indicates failure because an IPsec Policy was not found at the given priority.
Table of Contents >> IPsec/IKE Programmer's Reference >> IPsec/IKE Function Reference