|
26 | 26 |
|
27 | 27 | /** Adds an attribute-value pair to the given list |
28 | 28 | * |
29 | | - * @note Always appends the new pair to the end of the list. |
| 29 | + * See rc_avpair_assign() for the format of the data. |
| 30 | + * |
| 31 | + * @note It always appends the new pair to the end of the list. |
30 | 32 | * |
31 | 33 | * @param rh a handle to parsed configuration. |
32 | 34 | * @param list a VALUE_PAIR array of values; initially must be NULL. |
@@ -66,6 +68,17 @@ VALUE_PAIR *rc_avpair_next (VALUE_PAIR *t) |
66 | 68 | } |
67 | 69 |
|
68 | 70 | /** Assigns the given value to an attribute-value pair |
| 71 | + * |
| 72 | + * If the value is of type PW_TYPE_STRING it must either be |
| 73 | + * a null terminated string with len set to -1, or raw data |
| 74 | + * with length properly set. For PW_TYPE_DATE, PW_TYPE_INTEGER, |
| 75 | + * and PW_TYPE_IPADDR an uint32_t number should be set at pval. |
| 76 | + * For IPv4 addresses it should be in host byte order. |
| 77 | + * |
| 78 | + * For PW_TYPE_IPV6ADDR type a 16-byte long address is expected, and |
| 79 | + * for PW_TYPE_IPV6PREFIX the rfc3162 prefix format is expected. Simply |
| 80 | + * that is a zero byte, a byte with the value of prefix (e.g., 112), and |
| 81 | + * the remaining bytes are the IPv6 address. |
69 | 82 | * |
70 | 83 | * @param vp a pointer to a VALUE_PAIR structure. |
71 | 84 | * @param pval the value (e.g., the actual username). |
@@ -120,6 +133,8 @@ int rc_avpair_assign (VALUE_PAIR *vp, void const *pval, int len) |
120 | 133 | } |
121 | 134 |
|
122 | 135 | /** Make a new attribute-value pair with given parameters |
| 136 | + * |
| 137 | + * See rc_avpair_assign() for the format of the data. |
123 | 138 | * |
124 | 139 | * @param rh a handle to parsed configuration. |
125 | 140 | * @param attrid The attribute of the pair to add (e.g., PW_USER_NAME). |
|
0 commit comments