tfSadbRecordGenerate
Table of Contents >> IPsec/IKE Programmer's Reference >> IPsec/IKE Function Reference
| #include <trsocket.h> |
| int tfSadbRecordGenerate | ( |
| ttSadbRecordPtrPtr saPtrPtr, | |
| ttChildSaInfoPtr saInfoPtr, | |
| ttUser8BitPtr keyMatPtr, | |
| ttUser16Bit keyMatLen, | |
| ttUser8Bit direction | |
| ); |
| This function call has been replaced by tfSadbRecordManualAdd. User is recommended to use tfSadbRecordManualAdd instead. |
Function Description
This procedure is used to generate one SA. The SA information will be included in a ttChildSaInfo pointer saInfoPtr and the key material is given by keyMatPtr. The SA will be inserted into the SAD hash table. Comparing to tfSadbRecordManualAdd, user can specify key length for each algorithm and variable lifetime parameters. This is useful if the user wishes to add SA using non-default key length or specify the lifetime.
Parameters
- saPtrPtr
- For output use. Carries the address of SA just generated.
- saInfoPtr
- Input, has most of the information of what kind of SA we are going to generate, see ttChildSaInfo
- keyMatPtr
- Pointer to the keying material
- keyMatLen
- Length of the keying material
- direction
- direction of the SA we are going to generate, can be either TM_IPSEC_INBOUND or TM_IPSEC_OUTBOUND. TM_IPSEC_BOTH_DIRECTION is not supported, because the keying material is used for one direction only.
Returns
- TM_ENOERROR
- An SA is successfully constructed. saPtrPtr contains the new SA pointerâs address.
- other value
- Error. saPtrPtr will contain NULL pointer
Table of Contents >> IPsec/IKE Programmer's Reference >> IPsec/IKE Function Reference