]> git.stg.codes - stg.git/blob - projects/rlm_stg/stgpair.h
Merge branch 'stg-2.409' into stg-2.409-radius
[stg.git] / projects / rlm_stg / stgpair.h
1 #ifndef __STG_STGPAIR_H__
2 #define __STG_STGPAIR_H__
3
4 #include <stddef.h>
5
6 #define STGPAIR_KEYLENGTH 64
7 #define STGPAIR_VALUELENGTH 256
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 typedef struct STG_PAIR {
14     char key[STGPAIR_KEYLENGTH];
15     char value[STGPAIR_VALUELENGTH];
16 } STG_PAIR;
17
18 typedef struct STG_RESULT {
19     STG_PAIR* modify;
20     STG_PAIR* reply;
21 } STG_RESULT;
22
23 inline
24 int emptyPair(const STG_PAIR* pair)
25 {
26     return pair != NULL && pair->key[0] != '\0' && pair->value[0] != '\0';
27 }
28
29 #ifdef __cplusplus
30 }
31 #endif
32
33 #endif