diff options
| author | Benoit Goby <benoit@android.com> | 2012-08-20 20:28:50 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-20 20:28:51 -0700 |
| commit | 300d6d65d022c4a4663d097e5271eac745be6278 (patch) | |
| tree | 848a65791a895226d482312a2355a54895e47da1 /adb/adb.h | |
| parent | 17687079519c9014ee6c5ad2d13c3163d40a02ce (diff) | |
| parent | f4ed516643ee8ed3a59ad1a8048f7ce5f47f93fb (diff) | |
| download | system_core-300d6d65d022c4a4663d097e5271eac745be6278.tar.gz system_core-300d6d65d022c4a4663d097e5271eac745be6278.tar.bz2 system_core-300d6d65d022c4a4663d097e5271eac745be6278.zip | |
Merge "adb: Add public key authentification" into jb-mr1-dev
Diffstat (limited to 'adb/adb.h')
| -rw-r--r-- | adb/adb.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -29,13 +29,14 @@ #define A_OKAY 0x59414b4f #define A_CLSE 0x45534c43 #define A_WRTE 0x45545257 +#define A_AUTH 0x48545541 #define A_VERSION 0x01000000 // ADB protocol version #define ADB_VERSION_MAJOR 1 // Used for help/version information #define ADB_VERSION_MINOR 0 // Used for help/version information -#define ADB_SERVER_VERSION 29 // Increment this when we want to force users to start a new adb server +#define ADB_SERVER_VERSION 30 // Increment this when we want to force users to start a new adb server typedef struct amessage amessage; typedef struct apacket apacket; @@ -165,6 +166,8 @@ typedef enum transport_type { kTransportHost, } transport_type; +#define TOKEN_SIZE 20 + struct atransport { atransport *next; @@ -181,6 +184,7 @@ struct atransport int ref_count; unsigned sync_token; int connection_state; + int online; transport_type type; /* usb handle or socket fd as needed */ @@ -198,6 +202,11 @@ struct atransport /* a list of adisconnect callbacks called when the transport is kicked */ int kicked; adisconnect disconnects; + + void *key; + unsigned char token[TOKEN_SIZE]; + fdevent auth_fde; + unsigned failed_auth_attempts; }; @@ -349,6 +358,7 @@ typedef enum { TRACE_SYSDEPS, TRACE_JDWP, /* 0x100 */ TRACE_SERVICES, + TRACE_AUTH, } AdbTrace; #if ADB_TRACE @@ -408,7 +418,7 @@ void adb_qemu_trace(const char* fmt, ...); #endif -#if !TRACE_PACKETS +#if !DEBUG_PACKETS #define print_packet(tag,p) do {} while (0) #endif |
