Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

wsp.h File Reference

#include "gwlib/gwlib.h"
#include "wap_addr.h"
#include "wap_events.h"
#include "wsp_server_session_machine.def"
#include "wsp_server_method_machine.def"
#include "wsp_server_push_machine.def"

Include dependency graph for wsp.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  WSPMachine
struct  WSPMethodMachine
struct  WSPPushMachine

Defines

#define INTEGER(name)   long name;
#define OCTSTR(name)   Octstr *name;
#define HTTPHEADERS(name)   List *name;
#define ADDRTUPLE(name)   WAPAddrTuple *name;
#define COOKIES(name)   List *name;
#define REFERER(name)   Octstr *name;
#define MACHINESLIST(name)   List *name;
#define CAPABILITIES(name)   List *name;
#define MACHINE(fields)   fields
#define INTEGER(name)   long name;
#define ADDRTUPLE(name)   WAPAddrTuple *name;
#define EVENT(name)   WAPEvent *name;
#define MACHINE(fields)   fields
#define INTEGER(name)   long name;
#define ADDRTUPLE(name)   WAPAddrTuple *name;
#define HTTPHEADER(name)   List *name;
#define MACHINE(fields)   fields

Typedefs

typedef WSPMachine WSPMachine
typedef WSPMethodMachine WSPMethodMachine
typedef WSPPushMachine WSPPushMachine

Enumerations

enum  wsp_encoding {
  WSP_1_1 = 1, WSP_1_2 = 2, WSP_1_3 = 3, WSP_1_4 = 4,
  WSP_1_5 = 5, WSP_1_6 = 6
}
enum  wsp_abort_values {
  WSP_ABORT_PROTOERR = 0xe0, WSP_ABORT_DISCONNECT = 0xe1, WSP_ABORT_SUSPEND = 0xe2, WSP_ABORT_RESUME = 0xe3,
  WSP_ABORT_CONGESTION = 0xe4, WSP_ABORT_CONNECTERR = 0xe5, WSP_ABORT_MRUEXCEEDED = 0xe6, WSP_ABORT_MOREXCEEDED = 0xe7,
  WSP_ABORT_PEERREQ = 0xe8, WSP_ABORT_NETERR = 0xe9, WSP_ABORT_USERREQ = 0xea, WSP_ABORT_USERRFS = 0xeb,
  WSP_ABORT_USERPND = 0xec, WSP_ABORT_USERDCR = 0xed, WSP_ABORT_USERDCU = 0xee
}

Functions

long wsp_convert_http_status_to_wsp_status (long http_status)
WSPMachinefind_session_machine_by_id (int)


Define Documentation

#define ADDRTUPLE name   )     WAPAddrTuple *name;
 

Definition at line 130 of file wsp.h.

#define ADDRTUPLE name   )     WAPAddrTuple *name;
 

Definition at line 130 of file wsp.h.

#define ADDRTUPLE name   )     WAPAddrTuple *name;
 

Definition at line 130 of file wsp.h.

#define CAPABILITIES name   )     List *name;
 

Definition at line 114 of file wsp.h.

#define COOKIES name   )     List *name;
 

Definition at line 111 of file wsp.h.

#define EVENT name   )     WAPEvent *name;
 

Definition at line 123 of file wsp.h.

#define HTTPHEADER name   )     List *name;
 

Definition at line 131 of file wsp.h.

#define HTTPHEADERS name   )     List *name;
 

Definition at line 109 of file wsp.h.

#define INTEGER name   )     long name;
 

Definition at line 129 of file wsp.h.

#define INTEGER name   )     long name;
 

Definition at line 129 of file wsp.h.

#define INTEGER name   )     long name;
 

Definition at line 129 of file wsp.h.

#define MACHINE fields   )     fields
 

Definition at line 132 of file wsp.h.

#define MACHINE fields   )     fields
 

Definition at line 132 of file wsp.h.

#define MACHINE fields   )     fields
 

Definition at line 132 of file wsp.h.

#define MACHINESLIST name   )     List *name;
 

Definition at line 113 of file wsp.h.

#define OCTSTR name   )     Octstr *name;
 

Definition at line 108 of file wsp.h.

#define REFERER name   )     Octstr *name;
 

Definition at line 112 of file wsp.h.


Typedef Documentation

typedef struct WSPMachine WSPMachine
 

Definition at line 98 of file wsp.h.

typedef struct WSPMethodMachine WSPMethodMachine
 

Definition at line 99 of file wsp.h.

typedef struct WSPPushMachine WSPPushMachine
 

Definition at line 100 of file wsp.h.


Enumeration Type Documentation

enum wsp_abort_values
 

Enumeration values:
WSP_ABORT_PROTOERR 
WSP_ABORT_DISCONNECT 
WSP_ABORT_SUSPEND 
WSP_ABORT_RESUME 
WSP_ABORT_CONGESTION 
WSP_ABORT_CONNECTERR 
WSP_ABORT_MRUEXCEEDED 
WSP_ABORT_MOREXCEEDED 
WSP_ABORT_PEERREQ 
WSP_ABORT_NETERR 
WSP_ABORT_USERREQ 
WSP_ABORT_USERRFS 
WSP_ABORT_USERPND 
WSP_ABORT_USERDCR 
WSP_ABORT_USERDCU 

Definition at line 79 of file wsp.h.

00079                       {
00080     WSP_ABORT_PROTOERR = 0xe0,
00081     WSP_ABORT_DISCONNECT = 0xe1,
00082     WSP_ABORT_SUSPEND = 0xe2,
00083     WSP_ABORT_RESUME = 0xe3,
00084     WSP_ABORT_CONGESTION = 0xe4,
00085     WSP_ABORT_CONNECTERR = 0xe5,
00086     WSP_ABORT_MRUEXCEEDED = 0xe6,
00087     WSP_ABORT_MOREXCEEDED = 0xe7,
00088     WSP_ABORT_PEERREQ = 0xe8,
00089     WSP_ABORT_NETERR = 0xe9,
00090     WSP_ABORT_USERREQ = 0xea,
00091     WSP_ABORT_USERRFS = 0xeb,
00092     WSP_ABORT_USERPND = 0xec,
00093     WSP_ABORT_USERDCR = 0xed,
00094     WSP_ABORT_USERDCU = 0xee
00095 };

enum wsp_encoding
 

Enumeration values:
WSP_1_1 
WSP_1_2 
WSP_1_3 
WSP_1_4 
WSP_1_5 
WSP_1_6 

Definition at line 69 of file wsp.h.

00069              {
00070     WSP_1_1 = 1, 
00071     WSP_1_2 = 2, 
00072     WSP_1_3 = 3, 
00073     WSP_1_4 = 4,
00074     WSP_1_5 = 5,
00075     WSP_1_6 = 6,
00076 } wsp_encoding;


Function Documentation

WSPMachine* find_session_machine_by_id int   ) 
 

Definition at line 1434 of file wsp_session.c.

References gwlist_search(), id_belongs_to_session(), and session_machines.

Referenced by return_reply(), and start_fetch().

01434                                                 {
01435 
01436     return gwlist_search(session_machines, &id, id_belongs_to_session);
01437 }

Here is the call graph for this function:

long wsp_convert_http_status_to_wsp_status long  http_status  ) 
 

Definition at line 77 of file wsp.c.

References error().

Referenced by make_resume_reply_pdu(), and pack_into_result_datagram().

00077                                                              {
00078     long hundreds, singles;
00079 
00080     /*
00081      * The table is regular, and can be expected to stay regular in
00082      * future versions of WSP.  The status value is read as XYY,
00083      * so that X is the first digit and Y is the value of the
00084      * second two digits.  This is encoded as a hex value 0xAB,
00085      * where A == X and B == YY.
00086      * This limits YY to the range 0-15, so an exception is made
00087      * to allow larger YY values when X is 4.  X value 5 is moved up
00088      * to A value 6 to allow more room for YY when X is 4.
00089      */
00090 
00091     hundreds = http_status / 100;
00092     singles = http_status % 100;
00093 
00094     if ((hundreds == 4 && singles > 31) ||
00095         (hundreds != 4 && singles > 15) ||
00096         hundreds < 1 || hundreds > 5)
00097         goto bad_status;
00098 
00099     if (hundreds > 4)
00100         hundreds++;
00101 
00102     return hundreds * 16 + singles;
00103 
00104 bad_status:
00105     error(0, "WSP: Unknown status code used internally. Oops.");
00106     return 0x60; /* Status 500, or "Internal Server Error" */
00107 }

Here is the call graph for this function:

See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.