Ignore:
Timestamp:
01/06/06 15:18:02 (14 years ago)
Author:
spascoe
Message:

Implemented full client-server handshake. A version message is now
exchanged client->server then server->client. These messages are logged
in debug mode. Message passing is implemented in Python on the server (at the
moment this is only implemented within test/test_embedded.py).

Location:
TI05-delivery/trunk/src/bbftp-client-3.2.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/bbftpc/bbftp_private_user.c

    r802 r1077  
    3030 
    3131#include <bbftp_private_user.h> 
     32#include <client.h> 
    3233 
    3334/* 
     
    3940*/ 
    4041extern char *privatestr ; 
     42 
     43extern int debug; 
     44 
     45/* From bbftp_util.c */ 
     46void printmessage(FILE *strm , int flag, int errcode, int tok, char *fmt, ...); 
     47 
    4148 
    4249/******************************************************************************* 
     
    118125int bbftp_private_auth(char *logmessage)  
    119126{ 
     127  char msg[NDG_MESSAGE_LEN]; 
     128 
    120129  /* Send version verification message.  */ 
    121   if (bbftp_private_send(NDG_FTP_PROTOCOL, NDG_MESSAGE_LEN, logmessage) == -1) { 
     130  sprintf(msg, "%.*s", NDG_MESSAGE_LEN - 1, NDG_HANDSHAKE); 
     131  if (bbftp_private_send(msg, NDG_MESSAGE_LEN, logmessage) == -1) { 
    122132    return -1; 
     133  } 
     134 
     135  /* Receive response */ 
     136  if (bbftp_private_recv(msg, NDG_MESSAGE_LEN, logmessage) == -1) { 
     137    return -1; 
     138  } 
     139 
     140  if (debug) { 
     141    printmessage(stdout,CASE_NORMAL,0,0,"Received Auth handshake: %s\n", msg) ; 
    123142  } 
    124143 
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/includes/bbftp_private_user.h

    r806 r1077  
    4343 */ 
    4444 
    45 #define NDG_FTP_VERSION "v0.0.1" 
    46 #define NDG_FTP_PROTOCOL ("NDG-bbFTP" NDG_FTP_VERSION) 
     45// Define this in the makefile 
     46// #define NDG_DELIVERY_VERSION "v0.0.1" 
     47#define NDG_STR(s) #s 
     48#define NDG_XSTR(s) NDG_STR(s) 
     49#define NDG_HANDSHAKE ("NDG-Delivery-client " NDG_XSTR(NDG_DELIVERY_VERSION)) 
    4750 
    4851#define NDG_MESSAGE_LEN 256 
     
    5255*/ 
    5356#define NDG_MAX_LOGMESSAGE 1024 
     57 
Note: See TracChangeset for help on using the changeset viewer.