diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-04-30 23:06:58 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-04-30 23:06:58 -0800 |
| commit | 70f179cd12ab6f1e563af1cefa355a48dd978a15 (patch) | |
| tree | 4198dd89914cef35a0a758fab4fb11efb5585124 | |
| parent | 46033c20f3bd6afc8222910d45d8d6733359a782 (diff) | |
| download | tinytac-70f179cd12ab6f1e563af1cefa355a48dd978a15.tar.gz tinytac-70f179cd12ab6f1e563af1cefa355a48dd978a15.tar.bz2 tinytac-70f179cd12ab6f1e563af1cefa355a48dd978a15.tar.xz tinytac-70f179cd12ab6f1e563af1cefa355a48dd978a15.zip | |
libtinytac: adding struct definitions for packet bodies
| -rw-r--r-- | include/tinytac.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/include/tinytac.h b/include/tinytac.h index ee32c8d..9457f67 100644 --- a/include/tinytac.h +++ b/include/tinytac.h | |||
| @@ -146,6 +146,13 @@ | |||
| 146 | 146 | ||
| 147 | typedef struct _tinytac TinyTac; | 147 | typedef struct _tinytac TinyTac; |
| 148 | typedef struct _tinytac_packet tinytac_pckt_t; | 148 | typedef struct _tinytac_packet tinytac_pckt_t; |
| 149 | typedef struct _tinytac_authen_start tinytac_authen_start_t; | ||
| 150 | typedef struct _tinytac_authen_reply tinytac_authen_reply_t; | ||
| 151 | typedef struct _tinytac_authen_continue tinytac_authen_cont_t; | ||
| 152 | typedef struct _tinytac_author_request tinytac_author_req_t; | ||
| 153 | typedef struct _tinytac_author_reply tinytac_author_reply_t; | ||
| 154 | typedef struct _tinytac_account_request tinytac_acct_req_t; | ||
| 155 | typedef struct _tinytac_account_reply tinytac_acct_reply_t; | ||
| 149 | 156 | ||
| 150 | 157 | ||
| 151 | struct _tinytac_packet | 158 | struct _tinytac_packet |
| @@ -160,6 +167,87 @@ struct _tinytac_packet | |||
| 160 | }; | 167 | }; |
| 161 | 168 | ||
| 162 | 169 | ||
| 170 | struct _tinytac_authen_start | ||
| 171 | { | ||
| 172 | uint8_t bdy_action; | ||
| 173 | uint8_t bdy_priv_lvl; | ||
| 174 | uint8_t bdy_authen_type; | ||
| 175 | uint8_t bdy_authen_service; | ||
| 176 | uint8_t bdy_user_len; | ||
| 177 | uint8_t bdy_port_len; | ||
| 178 | uint8_t bdy_rem_addr_len; | ||
| 179 | uint8_t bdy_data_len; | ||
| 180 | uint8_t bdy_bytes[]; | ||
| 181 | }; | ||
| 182 | |||
| 183 | |||
| 184 | struct _tinytac_authen_reply | ||
| 185 | { | ||
| 186 | uint8_t bdy_status; | ||
| 187 | uint8_t bdy_flags; | ||
| 188 | uint16_t bdy_server_msg_len; | ||
| 189 | uint16_t bdy_data_len; | ||
| 190 | uint8_t bdy_bytes[]; | ||
| 191 | }; | ||
| 192 | |||
| 193 | |||
| 194 | struct _tinytac_authen_continue | ||
| 195 | { | ||
| 196 | uint16_t bdy_user_msg_len; | ||
| 197 | uint16_t bdy_data_len; | ||
| 198 | uint8_t bdy_flags; | ||
| 199 | uint8_t bdy_bytes[]; | ||
| 200 | }; | ||
| 201 | |||
| 202 | |||
| 203 | struct _tinytac_author_request | ||
| 204 | { | ||
| 205 | uint8_t bdy_authen_method; | ||
| 206 | uint8_t bdy_priv_lvl; | ||
| 207 | uint8_t bdy_authen_type; | ||
| 208 | uint8_t bdy_authen_service; | ||
| 209 | uint8_t bdy_user_len; | ||
| 210 | uint8_t bdy_port_len; | ||
| 211 | uint8_t bdy_rem_addr_len; | ||
| 212 | uint8_t bdy_arg_cnt; | ||
| 213 | uint8_t bdy_bytes[]; | ||
| 214 | }; | ||
| 215 | |||
| 216 | |||
| 217 | struct _tinytac_author_reply | ||
| 218 | { | ||
| 219 | uint8_t bdy_status; | ||
| 220 | uint8_t bdy_arg_cnt; | ||
| 221 | uint16_t bdy_server_msg_len; | ||
| 222 | uint16_t bdy_data_len; | ||
| 223 | uint8_t bdy_bytes[]; | ||
| 224 | }; | ||
| 225 | |||
| 226 | |||
| 227 | struct _tinytac_account_request | ||
| 228 | { | ||
| 229 | uint8_t bdy_flags; | ||
| 230 | uint8_t bdy_authen_method; | ||
| 231 | uint8_t bdy_priv_lvl; | ||
| 232 | uint8_t bdy_authen_type; | ||
| 233 | uint8_t bdy_authen_service; | ||
| 234 | uint8_t bdy_user_len; | ||
| 235 | uint8_t bdy_port_len; | ||
| 236 | uint8_t bdy_rem_addr_len; | ||
| 237 | uint8_t bdy_arg_cnt; | ||
| 238 | uint8_t bdy_bytes[]; | ||
| 239 | }; | ||
| 240 | |||
| 241 | |||
| 242 | struct _tinytac_account_reply | ||
| 243 | { | ||
| 244 | uint16_t bdy_server_msg_len; | ||
| 245 | uint16_t bdy_data_len; | ||
| 246 | uint8_t bdy_status; | ||
| 247 | uint8_t bdy_bytes[]; | ||
| 248 | }; | ||
| 249 | |||
| 250 | |||
| 163 | ////////////////// | 251 | ////////////////// |
| 164 | // // | 252 | // // |
| 165 | // Prototypes // | 253 | // Prototypes // |
