Created
November 15, 2010 00:42
-
-
Save kev009/676268 to your computer and use it in GitHub Desktop.
handshake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* pid 0x02 */ | |
| struct packet_handshake | |
| { | |
| uint8_t pid; | |
| int16_t ulen; | |
| char *username; | |
| }; | |
| /* Use a non-authenticating handshake for now */ | |
| struct packet_handshake s_hs; | |
| bzero(&s_hs, sizeof(s_hs)); | |
| s_hs.pid = 0x02; | |
| s_hs.ulen = 1; | |
| s_hs.username = (char *) malloc(1); | |
| bzero(s_hs.username, 1); | |
| strncpy(s_hs.username, "-", 1); | |
| evbuffer_add(output, &s_hs, sizeof(s_hs)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment