proto.h File Reference

#include <machine/endian.h>
#include <proto_v3.h>
#include <proto_v4.h>

Include dependency graph for proto.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nu_header
struct  nufw_to_nuauth_message_header_t
struct  nu_authreq
struct  nu_authfield
struct  nu_authfield_ipv6
struct  nu_authfield_ipv4
struct  nu_authfield_app
struct  nu_authfield_hello
struct  nu_srv_message
struct  nu_srv_helloreq

Defines

#define AUTHREQ_PORT   4128
#define USERPCKT_PORT   4129
#define USERPCKT_SERVICE   "4129"
#define PROTO_STRING   "PROTO"
#define PROTO_UNKNOWN   0
#define PROTO_VERSION   PROTO_VERSION_V22
#define PROTO_NUFW_VERSION   PROTO_VERSION_NUFW_V22_2
#define OS_SRV   0x1
#define APP_TYPE_NAME   0x1
#define APP_TYPE_SHA1   0x2

Enumerations

enum  proto_type_t { NUFW_PROTO = 0, CLIENT_PROTO }
enum  proto_client_version_t { PROTO_VERSION_V20 = 3, PROTO_VERSION_V22, PROTO_VERSION_V22_1 }
enum  proto_nufw_version_t { PROTO_VERSION_NUFW_V20 = 3, PROTO_VERSION_NUFW_V22, PROTO_VERSION_NUFW_V22_2 }
enum  decision_t { DECISION_DROP = 0, DECISION_ACCEPT, DECISION_NODECIDE, DECISION_REJECT }
enum  nufw_message_t {
  AUTH_REQUEST = 0x1, AUTH_ANSWER, USER_REQUEST, AUTH_CONTROL,
  USER_HELLO, AUTH_CONN_DESTROY, AUTH_CONN_UPDATE, AUTH_CONN_FIXED_TIMEOUT
}
enum  nu_field_identifier_t {
  IPV4_FIELD = 1, IPV6_FIELD, APP_FIELD, OS_FIELD,
  USERNAME_FIELD, HELLO_FIELD
}
enum  nu_type_t { SRV_TYPE = 1, SRV_REQUIRED_PACKET, SRV_REQUIRED_DISCONNECT, SRV_REQUIRED_HELLO }
enum  nu_server_mode_t { SRV_TYPE_POLL = 0, SRV_TYPE_PUSH }


Define Documentation

#define APP_TYPE_NAME   0x1

Definition at line 112 of file proto.h.

Referenced by send_user_pckt().

#define APP_TYPE_SHA1   0x2

Application is defined by full path and SHA1 sig of binary.

Format is : "full_path_app;SHA1 sig" each filed being base64 encoded

Definition at line 119 of file proto.h.

#define AUTHREQ_PORT   4128

Definition at line 35 of file proto.h.

Referenced by init_nuauthconf(), and main().

#define OS_SRV   0x1

(possible value of the option member of nuv2_authfield)

Definition at line 110 of file proto.h.

Referenced by sasl_parse_user_os(), and send_os().

#define PROTO_NUFW_VERSION   PROTO_VERSION_NUFW_V22_2

Definition at line 63 of file proto.h.

Referenced by auth_packet_to_decision(), auth_request_send(), and authpckt_new_connection().

#define PROTO_STRING   "PROTO"

Definition at line 41 of file proto.h.

Referenced by get_proto_info().

#define PROTO_UNKNOWN   0

Definition at line 42 of file proto.h.

Referenced by tls_nufw_accept(), and treat_nufw_request().

#define PROTO_VERSION   PROTO_VERSION_V22

Definition at line 55 of file proto.h.

Referenced by recv_message(), send_hello_pckt(), send_user_pckt(), and treat_user_request().

#define USERPCKT_PORT   4129

Definition at line 36 of file proto.h.

Referenced by init_nuauthconf().

#define USERPCKT_SERVICE   "4129"

Definition at line 37 of file proto.h.

Referenced by do_connect().


Enumeration Type Documentation

enum decision_t

Enumerator:
DECISION_DROP  NuAuth decision answer: drop packet
DECISION_ACCEPT  NuAuth decision answer: packet accepted
DECISION_NODECIDE  NuAuth decision answer: can't decide!
DECISION_REJECT  NuAuth decision answer: reject the packet

Definition at line 121 of file proto.h.

enum nu_field_identifier_t

Enumerator:
IPV4_FIELD 
IPV6_FIELD 
APP_FIELD 
OS_FIELD 
USERNAME_FIELD 
HELLO_FIELD 

Definition at line 146 of file proto.h.

enum nu_server_mode_t

Server mode, value of with SRV_TYPE (nuv2_srv_message) message type

Enumerator:
SRV_TYPE_POLL  Server works in POLL mode (default)
SRV_TYPE_PUSH  Server works in PUSH mode

Definition at line 228 of file proto.h.

enum nu_type_t

Enumerator:
SRV_TYPE  Send server mode: SRV_TYPE_PUSH or SRV_TYPE_POLL
SRV_REQUIRED_PACKET 
SRV_REQUIRED_DISCONNECT 
SRV_REQUIRED_HELLO 

Definition at line 220 of file proto.h.

enum nufw_message_t

Message type : stored on 4 bits

Used in nufw_to_nuauth_message_header_t

Enumerator:
AUTH_REQUEST 
AUTH_ANSWER 
USER_REQUEST 
AUTH_CONTROL 
USER_HELLO 
AUTH_CONN_DESTROY 
AUTH_CONN_UPDATE 
AUTH_CONN_FIXED_TIMEOUT 

Definition at line 134 of file proto.h.

enum proto_client_version_t

Enumerator:
PROTO_VERSION_V20 
PROTO_VERSION_V22 
PROTO_VERSION_V22_1 

Definition at line 49 of file proto.h.

enum proto_nufw_version_t

Enumerator:
PROTO_VERSION_NUFW_V20 
PROTO_VERSION_NUFW_V22 
PROTO_VERSION_NUFW_V22_2 

Definition at line 57 of file proto.h.

enum proto_type_t

Enumerator:
NUFW_PROTO 
CLIENT_PROTO 

Definition at line 44 of file proto.h.


Generated on Sat Nov 22 04:00:39 2008 for NuFW by  doxygen 1.4.7