Mercurial > hg > freeDiameter
comparison extensions/app_radgw/rgw.h @ 516:1c2f5ee38039
Allow RADIUS Proxies with the app_radgw extension
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 27 Aug 2010 10:59:51 +0900 |
parents | 26aafbbc1640 |
children | 345537783a90 |
comparison
equal
deleted
inserted
replaced
515:b9167b4de7dc | 516:1c2f5ee38039 |
---|---|
55 /* received on ACCT or AUTH port? */ | 55 /* received on ACCT or AUTH port? */ |
56 unsigned serv_type :2; | 56 unsigned serv_type :2; |
57 | 57 |
58 /* The message has a valid Message-Authenticator attribute */ | 58 /* The message has a valid Message-Authenticator attribute */ |
59 unsigned valid_mac :1; | 59 unsigned valid_mac :1; |
60 | |
61 /* The message has a valid NAS-IP(v6)-Address (1) and/or NAS-Identifier (2) attribute */ | |
62 unsigned valid_nas_info :2; | |
63 }; | 60 }; |
64 | 61 |
65 }; | 62 }; |
66 void rgw_msg_free(struct rgw_radius_msg_meta ** msg); | 63 void rgw_msg_free(struct rgw_radius_msg_meta ** msg); |
67 int rgw_msg_parse(unsigned char * buf, size_t len, struct rgw_radius_msg_meta ** msg); | 64 int rgw_msg_parse(unsigned char * buf, size_t len, struct rgw_radius_msg_meta ** msg); |
68 void rgw_msg_dump(struct rgw_radius_msg_meta * msg); | 65 void rgw_msg_dump(struct rgw_radius_msg_meta * msg); |
69 int rgw_msg_auth_check(struct rgw_radius_msg_meta * msg, struct rgw_client * cli, uint8_t * req_auth); | |
70 int rgw_msg_create_base(struct rgw_client * cli, struct msg ** diam); | |
71 int rgw_msg_init(void); | |
72 | 66 |
73 /* Local RADIUS server(s) configuration */ | 67 /* Local RADIUS server(s) configuration */ |
74 struct rgw_serv { | 68 struct rgw_serv { |
75 unsigned disabled :1; | 69 unsigned disabled :1; |
76 unsigned ip_disabled :1; | 70 unsigned ip_disabled :1; |
94 int rgw_servers_send(int type, unsigned char *buf, size_t buflen, struct sockaddr *to, uint16_t to_port); | 88 int rgw_servers_send(int type, unsigned char *buf, size_t buflen, struct sockaddr *to, uint16_t to_port); |
95 void rgw_servers_fini(void); | 89 void rgw_servers_fini(void); |
96 | 90 |
97 | 91 |
98 /* Clients management */ | 92 /* Clients management */ |
99 int rgw_clients_add( struct sockaddr * ip_port, unsigned char ** key, size_t keylen ); | 93 enum rgw_cli_type { RGW_CLI_NAS, RGW_CLI_PXY }; |
94 int rgw_clients_auth_check(struct rgw_radius_msg_meta * msg, struct rgw_client * cli, uint8_t * req_auth); | |
95 int rgw_clients_add( struct sockaddr * ip_port, unsigned char ** key, size_t keylen, enum rgw_cli_type type ); | |
100 int rgw_clients_getkey(struct rgw_client * cli, unsigned char **key, size_t *key_len); | 96 int rgw_clients_getkey(struct rgw_client * cli, unsigned char **key, size_t *key_len); |
97 int rgw_clients_gettype(struct rgw_client * cli, enum rgw_cli_type *type); | |
101 int rgw_clients_search(struct sockaddr * ip_port, struct rgw_client ** ref); | 98 int rgw_clients_search(struct sockaddr * ip_port, struct rgw_client ** ref); |
102 int rgw_clients_check_dup(struct rgw_radius_msg_meta **msg, struct rgw_client *cli); | 99 int rgw_clients_check_dup(struct rgw_radius_msg_meta **msg, struct rgw_client *cli); |
103 int rgw_clients_check_origin(struct rgw_radius_msg_meta *msg, struct rgw_client *cli); | 100 int rgw_clients_create_origin(struct rgw_radius_msg_meta *msg, struct rgw_client * cli, struct msg ** diam); |
104 int rgw_client_finish_send(struct radius_msg ** msg, struct rgw_radius_msg_meta * req, struct rgw_client * cli); | 101 int rgw_client_finish_send(struct radius_msg ** msg, struct rgw_radius_msg_meta * req, struct rgw_client * cli); |
105 void rgw_clients_dispose(struct rgw_client ** ref); | 102 void rgw_clients_dispose(struct rgw_client ** ref); |
106 void rgw_clients_dump(void); | 103 void rgw_clients_dump(void); |
104 int rgw_clients_init(void); | |
107 void rgw_clients_fini(void); | 105 void rgw_clients_fini(void); |
108 int rgw_client_session_add(struct rgw_client * cli, struct session *sess, char * dest_realm, char * dest_host, application_id_t appid); | 106 int rgw_client_session_add(struct rgw_client * cli, struct session *sess, char * dest_realm, char * dest_host, application_id_t appid); |
109 int rgw_client_session_stop(struct rgw_client * cli, struct session * sess, int32_t reason); | 107 int rgw_client_session_stop(struct rgw_client * cli, struct session * sess, int32_t reason); |
110 | 108 |
111 | 109 |