/[rdesktop]/sourceforge.net/trunk/rdesktop/proto.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/proto.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (hide annotations)
Wed May 10 07:36:34 2000 UTC (24 years ago) by matty
Original Path: sourceforge.net/branches/RDESKTOP/rdesktop/proto.h
File MIME type: text/plain
File size: 5879 byte(s)
Adding my experimental RDP client to repository.

1 matty 3 /*
2     rdesktop: A Remote Desktop Protocol client.
3     Function prototypes
4     Copyright (C) Matthew Chapman 1999-2000
5    
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10    
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     GNU General Public License for more details.
15    
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19     */
20    
21     /* Parsing layer */
22     BOOL prs_io_uint8(STREAM s, uint8 *i);
23     BOOL prs_io_uint8s(STREAM s, uint8 *p, unsigned int length);
24     BOOL msb_io_uint16(STREAM s, uint16 *i);
25     BOOL lsb_io_uint16(STREAM s, uint16 *i);
26     BOOL lsb_io_uint32(STREAM s, uint32 *i);
27    
28     /* TCP layer */
29     HCONN tcp_connect(char *server);
30     void tcp_disconnect(HCONN conn);
31     BOOL tcp_send(HCONN conn);
32     BOOL tcp_recv(HCONN conn, int length);
33    
34     /* ISO layer */
35     HCONN iso_connect(char *server);
36     void iso_disconnect(HCONN conn);
37     BOOL iso_send_msg(HCONN conn, uint8 code);
38     BOOL iso_recv_msg(HCONN conn, uint8 *code);
39     void iso_init(struct connection *conn);
40     BOOL iso_send(HCONN conn);
41     BOOL iso_recv(HCONN conn);
42     void iso_make_tpkt(TPKT *tpkt, int length);
43     BOOL iso_io_tpkt(STREAM s, TPKT *tpkt);
44     void iso_make_tpdu(TPDU *tpdu, uint8 code);
45     BOOL iso_io_tpdu(STREAM s, TPDU *tpdu);
46    
47     /* MCS layer */
48     HCONN mcs_connect(char *server);
49     BOOL mcs_join_channel(HCONN conn, uint16 chanid);
50     void mcs_disconnect(HCONN conn);
51     void mcs_send_connect_initial(HCONN conn);
52     void mcs_send_edrq(HCONN conn);
53     void mcs_send_aurq(HCONN conn);
54     void mcs_send_cjrq(HCONN conn, uint16 chanid);
55     void mcs_init_data(HCONN conn);
56     void mcs_send_data(HCONN conn, uint16 chanid, BOOL request);
57     int mcs_recv(HCONN conn, BOOL request);
58     void mcs_make_domain_params(DOMAIN_PARAMS *dp, uint16 max_channels,
59     uint16 max_users, uint16 max_tokens, uint16 max_pdusize);
60     void mcs_make_connect_initial(MCS_CONNECT_INITIAL *mci);
61     BOOL ber_io_header(STREAM s, BOOL islong, int tagval, int *length);
62     BOOL ber_io_octet_string(STREAM s, OCTET_STRING *os);
63     BOOL ber_io_integer(STREAM s, uint16 *i);
64     BOOL ber_io_uint8(STREAM s, uint8 *i, int tagval);
65     BOOL mcs_io_domain_params(STREAM s, DOMAIN_PARAMS *dp);
66     BOOL mcs_io_connect_initial(STREAM s, MCS_CONNECT_INITIAL *mci);
67     BOOL mcs_io_connect_response(STREAM s, MCS_CONNECT_RESPONSE *mcr);
68     BOOL mcs_io_edrq(STREAM s, MCS_EDRQ *edrq);
69     BOOL mcs_io_aurq(STREAM s, MCS_AURQ *aurq);
70     BOOL mcs_io_aucf(STREAM s, MCS_AUCF *aucf);
71     BOOL mcs_io_cjrq(STREAM s, MCS_CJRQ *cjrq);
72     BOOL mcs_io_cjcf(STREAM s, MCS_CJCF *cjcf);
73     BOOL mcs_io_data(STREAM s, MCS_DATA *dt, BOOL request);
74    
75     /* RDP layer */
76     HCONN rdp_connect(char *server);
77     void process_orders(HCONN conn, RDP_ORDER_STATE *os);
78     void rdp_establish_key(HCONN conn);
79     void rdp_send_cert(HCONN conn);
80     void rdp_send_confirm_active(HCONN conn);
81     void rdp_send_control(HCONN conn, uint16 action);
82     void rdp_send_synchronize(HCONN conn);
83     void rdp_send_fonts(HCONN conn, uint16 seqno);
84     void rdp_send_input(HCONN conn);
85     BOOL rdp_recv_pdu(HCONN conn, uint8 *type);
86     void rdp_disconnect(HCONN conn);
87     void rdp_make_header(RDP_HEADER *hdr, uint16 length, uint16 pdu_type,
88     uint16 userid);
89     void rdp_make_data_header(RDP_DATA_HEADER *hdr, uint32 shareid,
90     uint16 length, uint16 data_pdu_type);
91     void rdp_make_general_caps(RDP_GENERAL_CAPS *caps);
92     void rdp_make_bitmap_caps(RDP_BITMAP_CAPS *caps);
93     void rdp_make_order_caps(RDP_ORDER_CAPS *caps);
94     void rdp_make_bmpcache_caps(RDP_BMPCACHE_CAPS *caps);
95     void rdp_make_control_caps(RDP_CONTROL_CAPS *caps);
96     void rdp_make_activate_caps(RDP_ACTIVATE_CAPS *caps);
97     void rdp_make_pointer_caps(RDP_POINTER_CAPS *caps);
98     void rdp_make_share_caps(RDP_SHARE_CAPS *caps, uint16 userid);
99     void rdp_make_colcache_caps(RDP_COLCACHE_CAPS *caps);
100     void rdp_make_active_pdu(RDP_ACTIVE_PDU *pdu, uint32 shareid, uint16 userid);
101     void rdp_make_control_pdu(RDP_CONTROL_PDU *pdu, uint16 action);
102     void rdp_make_synchronize_pdu(RDP_SYNCHRONIZE_PDU *pdu, uint16 userid);
103     void rdp_make_font_pdu(RDP_FONT_PDU *pdu, uint16 seqno);
104     void rdp_make_input_pdu(RDP_INPUT_PDU *pdu);
105     BOOL rdp_io_header(STREAM s, RDP_HEADER *hdr);
106     BOOL rdp_io_data_header(STREAM s, RDP_DATA_HEADER *hdr);
107     BOOL rdp_io_general_caps(STREAM s, RDP_GENERAL_CAPS *caps);
108     BOOL rdp_io_bitmap_caps(STREAM s, RDP_BITMAP_CAPS *caps);
109     BOOL rdp_io_order_caps(STREAM s, RDP_ORDER_CAPS *caps);
110     BOOL rdp_io_bmpcache_info(STREAM s, RDP_BMPCACHE_INFO *info);
111     BOOL rdp_io_bmpcache_caps(STREAM s, RDP_BMPCACHE_CAPS *caps);
112     BOOL rdp_io_control_caps(STREAM s, RDP_CONTROL_CAPS *caps);
113     BOOL rdp_io_activate_caps(STREAM s, RDP_ACTIVATE_CAPS *caps);
114     BOOL rdp_io_pointer_caps(STREAM s, RDP_POINTER_CAPS *caps);
115     BOOL rdp_io_share_caps(STREAM s, RDP_SHARE_CAPS *caps);
116     BOOL rdp_io_colcache_caps(STREAM s, RDP_COLCACHE_CAPS *caps);
117     BOOL rdp_io_active_pdu(STREAM s, RDP_ACTIVE_PDU *pdu, int pdutype);
118     BOOL rdp_io_control_pdu(STREAM s, RDP_CONTROL_PDU *pdu);
119     BOOL rdp_io_synchronize_pdu(STREAM s, RDP_SYNCHRONIZE_PDU *pdu);
120     BOOL rdp_io_input_event(STREAM s, RDP_INPUT_EVENT *evt);
121     BOOL rdp_io_input_pdu(STREAM s, RDP_INPUT_PDU *pdu);
122     BOOL rdp_io_font_info(STREAM s, RDP_FONT_INFO *font);
123     BOOL rdp_io_font_pdu(STREAM s, RDP_FONT_PDU *pdu);
124     BOOL rdp_io_update_pdu(STREAM s, RDP_UPDATE_PDU *pdu);
125     BOOL rdp_io_secondary_order(STREAM s, RDP_SECONDARY_ORDER *rso);
126     BOOL rdp_io_bitmap_header(STREAM s, RDP_BITMAP_HEADER *rdh);
127    
128     /* Utility routines */
129     void *xmalloc(int size);
130     void *xrealloc(void *oldmem, int size);
131     BOOL bitmap_decompress(unsigned char *input, int size,
132     unsigned char *output, int width);
133    

  ViewVC Help
Powered by ViewVC 1.1.26