Check-in [f9114a0f4a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added protocol definitions for a "HOSTNAME" command and reply. Updated backuppcd to attempt to be smarter about finding itself.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f9114a0f4a3b861247a4c6b68020e403c2d97eb0
User & Date: rkeene 2006-03-14 10:23:06
Context
2008-04-05
20:57
Many changes to BackupPCd client (BackupPC side of things) check-in: aaba012330 user: rkeene tags: trunk
2006-03-14
10:23
Added protocol definitions for a "HOSTNAME" command and reply. Updated backuppcd to attempt to be smarter about finding itself. check-in: f9114a0f4a user: rkeene tags: trunk
2006-03-13
10:19
BackupPCd 0.1.3 Added "--with-notifyserv" and "--with-updateurl" configuration options to hard-code their respective parameters as defaults into the resulting executable. check-in: 9164d12258 user: rkeene tags: trunk
Changes

Changes to backuppcd.c.

2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
#else
	if (argv[0][0] == '/') {
#endif
		snprintf(localfile, sizeof(localfile), "%s", argv[0]);
		if (access(localfile, R_OK) != 0) {
			snprintf(localfile, sizeof(localfile), "%s%s", argv[0], EXEEXT);
		}
	} else if (argv[0][0] == '.') {
		getcwd(curdir, sizeof(curdir));
		curdir[sizeof(curdir) - 1] = '\0';
		snprintf(localfile, sizeof(localfile), "%s/%s", curdir, argv[0]);
		if (access(localfile, R_OK) != 0) {
			snprintf(localfile, sizeof(localfile), "%s/%s%s", curdir, argv[0], EXEEXT);
		}
	} else {







|







2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
#else
	if (argv[0][0] == '/') {
#endif
		snprintf(localfile, sizeof(localfile), "%s", argv[0]);
		if (access(localfile, R_OK) != 0) {
			snprintf(localfile, sizeof(localfile), "%s%s", argv[0], EXEEXT);
		}
	} else if (argv[0][0] == '.' || strchr(argv[0], '/')) {
		getcwd(curdir, sizeof(curdir));
		curdir[sizeof(curdir) - 1] = '\0';
		snprintf(localfile, sizeof(localfile), "%s/%s", curdir, argv[0]);
		if (access(localfile, R_OK) != 0) {
			snprintf(localfile, sizeof(localfile), "%s/%s%s", curdir, argv[0], EXEEXT);
		}
	} else {

Changes to doc/protocol.txt.

96
97
98
99
100
101
102




103
104
105
106
107
108
109
...
154
155
156
157
158
159
160





		[PATHNAME_LENGTH (32 bits)]
		[PATHNAME (PATHNAME_LENGTH * 8 bits)]
		RDIFF_INFO {
			[RDIFF_BLOCK_MD5 (128 bits)]
		} (RDIFF_INFO_LENGTH * 8 bits)
	} (160 + ((RDIFF_INFO_LENGTH + PATHNAME_LENGTH) * 8) bits)
  Notes:  Requires the user to authenticate with READ or RDWR access.





COMMAND == 0x81: Authenticate reply
	{
		[STATUS (8 bits): 0 == OKAY, 1 == FAILURE]
	} (8 bits)

COMMAND == 0x82: Enable SSL Reply
................................................................................
		RDIFF_PARTS {
			[PART_BEGIN (64 bits)]
			[PART_LENGTH (64 bits)]
			[PART_DATA (PART_LENGTH * 8 bits)]
		} (RDIFF_PARTS_LENGTH * 8 bits)
	} (160 + ((PATHNAME_LENGTH + RDIFF_PARTS_LENGTH) * 8) bits)













>
>
>
>







 







>
>
>
>
>
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
158
159
160
161
162
163
164
165
166
167
168
169
		[PATHNAME_LENGTH (32 bits)]
		[PATHNAME (PATHNAME_LENGTH * 8 bits)]
		RDIFF_INFO {
			[RDIFF_BLOCK_MD5 (128 bits)]
		} (RDIFF_INFO_LENGTH * 8 bits)
	} (160 + ((RDIFF_INFO_LENGTH + PATHNAME_LENGTH) * 8) bits)
  Notes:  Requires the user to authenticate with READ or RDWR access.

COMMAND == 0x8:  Get host info
	{
	} (0 bits)

COMMAND == 0x81: Authenticate reply
	{
		[STATUS (8 bits): 0 == OKAY, 1 == FAILURE]
	} (8 bits)

COMMAND == 0x82: Enable SSL Reply
................................................................................
		RDIFF_PARTS {
			[PART_BEGIN (64 bits)]
			[PART_LENGTH (64 bits)]
			[PART_DATA (PART_LENGTH * 8 bits)]
		} (RDIFF_PARTS_LENGTH * 8 bits)
	} (160 + ((PATHNAME_LENGTH + RDIFF_PARTS_LENGTH) * 8) bits)

COMMAND == 0x88: Host info reply
	{
		[HOSTNAME_LEN (16bits)]
		[HOSTNAME (HOSTNAME_LEN * 8bits)]
	} (16 + (HOSTNAME_LEN * 8) bits)