summary refs log tree commit diff stats
path: root/src/common/textenums.h
blob: 682a35ef3ac6453bab9c113a818f62c1eae38776 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* this file is auto generated, edit textevents.in instead! */

enum
{
	XP_TE_ADDNOTIFY,		XP_TE_BANLIST,
	XP_TE_BANNED,		XP_TE_BEEP,
	XP_TE_CHANGENICK,		XP_TE_CHANACTION,
	XP_TE_HCHANACTION,		XP_TE_CHANBAN,
	XP_TE_CHANDATE,		XP_TE_CHANDEHOP,
	XP_TE_CHANDEOP,		XP_TE_CHANDEVOICE,
	XP_TE_CHANEXEMPT,		XP_TE_CHANHOP,
	XP_TE_CHANINVITE,		XP_TE_CHANLISTHEAD,
	XP_TE_CHANMSG,		XP_TE_CHANMODEGEN,
	XP_TE_CHANMODES,		XP_TE_HCHANMSG,
	XP_TE_CHANNOTICE,		XP_TE_CHANOP,
	XP_TE_CHANRMEXEMPT,		XP_TE_CHANRMINVITE,
	XP_TE_CHANRMKEY,		XP_TE_CHANRMLIMIT,
	XP_TE_CHANSETKEY,		XP_TE_CHANSETLIMIT,
	XP_TE_CHANUNBAN,		XP_TE_CHANVOICE,
	XP_TE_CONNECTED,		XP_TE_CONNECT,
	XP_TE_CONNFAIL,		XP_TE_CTCPGEN,
	XP_TE_CTCPGENC,		XP_TE_CTCPSEND,
	XP_TE_CTCPSND,		XP_TE_CTCPSNDC,
	XP_TE_DCCCHATABORT,		XP_TE_DCCCONCHAT,
	XP_TE_DCCCHATF,		XP_TE_DCCCHATOFFER,
	XP_TE_DCCCHATOFFERING,		XP_TE_DCCCHATREOFFER,
	XP_TE_DCCCONFAIL,		XP_TE_DCCGENERICOFFER,
	XP_TE_DCCHEAD,		XP_TE_MALFORMED,
	XP_TE_DCCOFFER,		XP_TE_DCCIVAL,
	XP_TE_DCCRECVABORT,		XP_TE_DCCRECVCOMP,
	XP_TE_DCCCONRECV,		XP_TE_DCCRECVERR,
	XP_TE_DCCFILEERR,		XP_TE_DCCRENAME,
	XP_TE_DCCRESUMEREQUEST,		XP_TE_DCCSENDABORT,
	XP_TE_DCCSENDCOMP,		XP_TE_DCCCONSEND,
	XP_TE_DCCSENDFAIL,		XP_TE_DCCSENDOFFER,
	XP_TE_DCCSTALL,		XP_TE_DCCTOUT,
	XP_TE_DELNOTIFY,		XP_TE_DISCON,
	XP_TE_FOUNDIP,		XP_TE_GENMSG,
	XP_TE_IGNOREADD,		XP_TE_IGNORECHANGE,
	XP_TE_IGNOREFOOTER,		XP_TE_IGNOREHEADER,
	XP_TE_IGNOREREMOVE,		XP_TE_IGNOREEMPTY,
	XP_TE_INVITE,		XP_TE_INVITED,
	XP_TE_JOIN,		XP_TE_KEYWORD,
	XP_TE_KICK,		XP_TE_KILL,
	XP_TE_MSGSEND,		XP_TE_MOTD,
	XP_TE_MOTDSKIP,		XP_TE_NICKCLASH,
	XP_TE_NICKFAIL,		XP_TE_NODCC,
	XP_TE_NOCHILD,		XP_TE_NOTICE,
	XP_TE_NOTICESEND,		XP_TE_NOTIFYEMPTY,
	XP_TE_NOTIFYHEAD,		XP_TE_NOTIFYNUMBER,
	XP_TE_NOTIFYOFFLINE,		XP_TE_NOTIFYONLINE,
	XP_TE_OPENDIALOG,		XP_TE_PART,
	XP_TE_PARTREASON,		XP_TE_PINGREP,
	XP_TE_PINGTIMEOUT,		XP_TE_PRIVACTION,
	XP_TE_DPRIVACTION,		XP_TE_PRIVMSG,
	XP_TE_DPRIVMSG,		XP_TE_ALREADYPROCESS,
	XP_TE_QUIT,		XP_TE_RAWMODES,
	XP_TE_WALLOPS,		XP_TE_RESOLVINGUSER,
	XP_TE_SERVERCONNECTED,		XP_TE_SERVERERROR,
	XP_TE_SERVERLOOKUP,		XP_TE_SERVNOTICE,
	XP_TE_SERVTEXT,		XP_TE_SSLMESSAGE,
	XP_TE_STOPCONNECT,		XP_TE_TOPIC,
	XP_TE_NEWTOPIC,		XP_TE_TOPICDATE,
	XP_TE_UKNHOST,		XP_TE_USERLIMIT,
	XP_TE_USERSONCHAN,		XP_TE_WHOIS_AUTH,
	XP_TE_WHOIS5,		XP_TE_WHOIS2,
	XP_TE_WHOIS6,		XP_TE_WHOIS_ID,
	XP_TE_WHOIS4,		XP_TE_WHOIS4T,
	XP_TE_WHOIS1,		XP_TE_WHOIS_REALHOST,
	XP_TE_WHOIS3,		XP_TE_WHOIS_SPECIAL,
	XP_TE_UJOIN,		XP_TE_UKICK,
	XP_TE_UPART,		XP_TE_UPARTREASON,
	XP_TE_UACTION,		XP_TE_UINVITE,
	XP_TE_UCHANMSG,		XP_TE_UCHANGENICK,
	NUM_XP
};
lass="p">; /* 37-38 */ /* packet specifics start at 39. */ union { struct { char pad1[18]; /* 39-56 */ guint16 magic3; /* 57-58 */ char pad3[114]; /* 59-172 */ guint16 magic5; /* 173-174: 0x4b, 0x00 */ char pad5[2]; /* 175-176 */ guint16 magic10; /* 177-178: 0x14, 0x00 */ char pad6[2]; /* 179-180 */ guint16 magic15; /* 181-182: 0x04, 0x00 */ char pad10[2]; /* 183-184 */ guint16 magic16; /* 185-186 */ char pad11[2]; /* 187-188 */ guint16 magic20; /* 189-190: 0x57, 0x04 */ guint16 magic25; /* 191-192: 0x00, 0x04 */ guint16 magic30; /* 193-194: 0x01, 0x00 */ char pad20[2]; /* 195-196: 0x4a, 0x02 */ guint16 magic35; /* 197-198: 0x4a, 0x02 */ char pad30[10]; /* 199-208 */ guint16 magic40; /* 209-210: 0x30, 0x00 */ char pad40[2]; /* 211-212 */ guint16 magic45; /* 213-214: 0x44, 0x00 */ char pad45[2]; /* 215-216 */ guint16 magic50; /* 217-218: 0x39, 0x00 */ char pad50[2]; /* 219-220 */ char data[256]; /* 221-EOP: a sequence of NULL-terminated strings: - username; - empty string (just a NULL); - application name; - hostname */ } hello; struct { char pad1[4]; /* 39-42 */ guint16 magic2; /* 43-44 */ char pad10[12]; /* 45-56 */ guint32 bindaddr; /* 57-60: address to bind. */ guint16 bindport; /* 61-62: port to bind. */ char pad15[2]; /* 63-64 */ guint16 magic3; /* 65-66 */ guint16 boundport; /* 67-68 */ char pad20[104]; /* 69-172 */ char NTLMSSP[sizeof("NTLMSSP")]; /* 173-180: "NTLMSSP" */ guint32 msgtype; /* 181-184: NTLM message type = 1 */ guint32 flags; /* 185-188: NTLM message flags */ guint16 magic20; /* 189-190: 0x28, 0x00 */ char pad30[2]; /* 191-192 */ guint16 magic25; /* 193-194: 0x96, 0x82 */ guint16 magic30; /* 195-196: 0x01, 0x00 */ char pad40[12]; /* 197-208 */ guint16 magic50; /* 209-210: 0x30, 0x00 */ char pad50[6]; /* 211-216 */ guint16 magic55; /* 217-218: 0x30, 0x00 */ char pad55[2]; /* 219-220 */ char data[0]; /* Dummy end marker, no real data required */ } auth; struct { char pad1[4]; /* 39-42 */ guint16 magic1; /* 43-44 */ guint32 magic2; /* 45-48 */ char pad2[8]; /* 49-56 */ guint16 magic3; /* 57-58 */ char pad3[6]; /* 59-64 */ guint16 magic4; /* 65-66 */ guint16 boundport; /* 67-68 */ char pad4[104]; /* 69-172 */ char NTLMSSP[sizeof("NTLMSSP")]; /* 173-180: "NTLMSSP" */ guint32 msgtype; /* 181-184: NTLM message type = 3 */ struct ntlm_buffer lm_resp; /* 185-192: LM response security buffer */ struct ntlm_buffer ntlm_resp; /* 193-200: NTLM response security buffer */ struct ntlm_buffer ntdomain_buf; /* 201-208: domain name security buffer */ struct ntlm_buffer username_buf; /* 209-216: username security buffer */ struct ntlm_buffer clienthost_buf; /* 217-224: hostname security buffer */ struct ntlm_buffer sessionkey_buf; /* 225-232: session key security buffer */ guint32 flags; /* 233-236: message flags */ char data[1024]; /* 237-EOP: data area */ } auth2; struct { guint16 magic1; /* 39-40 */ char pad1[2]; /* 41-42 */ guint16 magic2; /* 43-44 */ guint32 magic3; /* 45-48 */ char pad5[8]; /* 48-56 */ guint16 magic6; /* 57-58: 0x0200 */ guint16 destport; /* 59-60 */ guint32 destaddr; /* 61-64 */ char pad10[4]; /* 65-68 */ guint16 magic10; /* 69-70 */ char pad15[2]; /* 71-72 */ guint16 srcport; /* 73-74: port client connects from */ char pad20[82]; /* 75-156 */ char executable[256]; /* 76-EOP: application name */ } connect; struct { guint16 magic1; /* 39-40 */ char pad5[2]; /* 41-42 */ guint16 magic5; /* 43-44 */ guint32 magic10; /* 45-48 */ char pad10[2]; /* 49-50 */ guint16 magic15; /* 51-52 */ guint32 magic16; /* 53-56 */ guint16 magic20; /* 57-58 */ guint16 clientport; /* 59-60: forwarded port. */ guint32 clientaddr; /* 61-64: forwarded address. */ guint32 magic30; /* 65-68 */ guint32 magic35; /* 69-72 */ guint16 serverport; /* 73-74: port server will connect to us from. */ guint16 srcport; /* 75-76: connect request; port used on client behalf. */ guint16 boundport; /* 77-78: bind request; port used on client behalf. */ guint32 boundaddr; /* 79-82: addr used on client behalf */ char pad30[90]; /* 83-172 */ char data[0]; /* End marker */ } connack; } packet; }; struct msproxy_response_t { guint32 packetid; /* 1-4 */ guint32 magic5; /* 5-8 */ guint32 serverid; /* 9-12 */ char clientack; /* 13: ack of last client packet. */ char pad5[3]; /* 14-16 */ unsigned char sequence; /* 17: sequence # of this packet. */ char pad10[7]; /* 18-24 */ char RWSP[4]; /* 25-28: 0x52,0x57,0x53,0x50 */ char pad15[8]; /* 29-36 */ guint16 command; /* 37-38 */ union { struct { char pad5[18]; /* 39-56 */ guint16 magic20; /* 57-58: 0x02, 0x00 */ char pad10[6]; /* 59-64 */ guint16 magic30; /* 65-66: 0x74, 0x01 */ char pad15[2]; /* 67-68 */ guint16 magic35; /* 69-70: 0x0c, 0x00 */ char pad20[6]; /* 71-76 */ guint16 magic50; /* 77-78: 0x04, 0x00 */ char pad30[6]; /* 79-84 */ guint16 magic60; /* 85-86: 0x65, 0x05 */ char pad35[2]; /* 87-88 */ guint16 magic65; /* 89-90: 0x02, 0x00 */ char pad40[8]; /* 91-98 */ guint16 udpport; /* 99-100 */ guint32 udpaddr; /* 101-104 */ } hello; struct { char pad1[6]; /* 39-44 */ guint32 magic10; /* 45-48 */ char pad3[10]; /* 49-58 */ guint16 boundport; /* 59-60: port server bound for us. */ guint32 boundaddr; /* 61-64: addr server bound for us. */ char pad10[4]; /* 65-68 */ guint16 magic15; /* 69-70 */ char pad15[102]; /* 70-172 */ char NTLMSSP[sizeof("NTLMSSP")]; /* 173-180: "NTLMSSP" */ guint32 msgtype; /* 181-184: NTLM message type = 2 */ struct ntlm_buffer target; /* 185-192: target security buffer */ guint32 flags; /* 193-196: NTLM message flags */ char challenge[8]; /* 197-204: NTLM challenge request */ char context[8]; /* 205-212: NTLM context */ char data[1024]; /* 213-EOP: target information data */ } auth; struct { guint16 magic1; /* 39-40 */ char pad5[18]; /* 41-58 */ guint16 clientport; /* 59-60: forwarded port. */ guint32 clientaddr; /* 61-64: forwarded address. */ guint32 magic10; /* 65-68 */ guint32 magic15; /* 69-72 */ guint16 serverport; /* 73-74: port server will connect to us from. */ guint16 srcport; /* 75-76: connect request; port used on client behalf. */ guint16 boundport; /* 77-78: bind request; port used on client behalf. */ guint32 boundaddr; /* 79-82: addr used on client behalf */ char pad10[90]; /* 83-172 */ } connect; } packet; }; #pragma pack() int traverse_msproxy (int sok, char *serverAddr, int port, struct msproxy_state_t *state, netstore *ns_proxy, int csok4, int csok6, int *csok, char bound); void msproxy_keepalive (void);