Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gdut-drcom
Commits
fb7005a0
Commit
fb7005a0
authored
Nov 08, 2016
by
chenhaowen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change to old checksum mode
parent
25965dbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/auth.c
src/auth.c
+7
-6
No files found.
src/auth.c
View file @
fb7005a0
...
...
@@ -61,7 +61,7 @@ static int make_keep_alive2_pkt2(uint8_t *buf, uint8_t cnt, uint8_t *flag,\
static
void
gen_ka1_checksum
(
uint8_t
*
checksum
,
uint8_t
*
seed
,
uint8_t
mode
);
static
void
gen_ka2_checksum
(
uint8_t
*
data
,
int
len
,
uint8_t
*
checksum
);
//
static int32_t drcomCRC32(char *data, int len);
static
int32_t
drcomCRC32
(
char
*
data
,
int
len
);
static
void
print_as_hex
(
uint8_t
*
buf
,
int
len
);
/****local functions****/
...
...
@@ -325,8 +325,6 @@ static void print_as_hex(uint8_t *buf, int len)
fflush
(
stdout
);
}
/* unused*/
/*
static
int32_t
drcomCRC32
(
char
*
data
,
int
len
)
{
int
ret
=
0
;
...
...
@@ -338,7 +336,6 @@ static int32_t drcomCRC32(char *data, int len)
}
return
ret
;
}
*/
static
int
make_keep_alive1_pkt1
(
uint8_t
*
buf
,
uint8_t
cnt
)
{
...
...
@@ -390,7 +387,8 @@ static int make_keep_alive1_pkt2(uint8_t *buf, uint8_t *seed,\
index
+=
4
;
memcpy
(
buf
+
index
,
seed
,
4
);
index
+=
4
;
/*
/**/
int32_t
temp_num
;
temp_num
=
20000711
;
memcpy
(
buf
+
index
,
(
char
*
)
&
temp_num
,
4
);
index
+=
4
;
...
...
@@ -403,7 +401,9 @@ static int make_keep_alive1_pkt2(uint8_t *buf, uint8_t *seed,\
index
+=
4
;
memcpy
(
buf
+
index
,
"
\x00\x00\x00\x00
"
,
4
);
index
+=
4
;
*/
/**/
/*
uint8_t checksum[8] = {0};
gen_ka1_checksum(checksum, seed, check_mode);
#ifdef DEBUG
...
...
@@ -413,6 +413,7 @@ static int make_keep_alive1_pkt2(uint8_t *buf, uint8_t *seed,\
#endif
memcpy(buf+index, checksum, 8);
index += 8;
*/
memset
(
buf
+
index
,
0x00
,
16
*
4
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment