Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement pseudo crc #9

Merged
merged 2 commits into from
Dec 5, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor edits - closes #8
  • Loading branch information
fklassen committed Dec 5, 2013
commit 5f029c389d3621099710d2fede60d4cde7f0718d
2 changes: 1 addition & 1 deletion src/tcpedit/checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void chksum_replace4(u_int16_t *sum, u_int32_t from, u_int32_t to)
* Apply modifications to an existing checksum based on
* 32-bit before and after values
*/
void cksum_replace2(u_int16_t *sum, u_int16_t from, u_int16_t to)
void chksum_replace2(u_int16_t *sum, u_int16_t from, u_int16_t to)
{
__chksum_replace4(sum, (u_int32_t)from, (u_int32_t)to);
}
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@

int do_checksum(tcpedit_t *, u_int8_t *, int, int);
void chksum_replace4(u_int16_t *sum, u_int32_t from, u_int32_t to);
void cksum_replace2(u_int16_t *sum, u_int16_t from, u_int16_t to);
void ckksum_replace2(u_int16_t *sum, u_int16_t from, u_int16_t to);

#endif
2 changes: 1 addition & 1 deletion src/tcpedit/edit_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fix_ipv6_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv6_hdr_t *i
int chksum_replace_ipv4(tcpedit_t *tcpedit, ipv4_hdr_t *ip_hdr, u_int32_t from, u_int32_t to)
{
if (tcpedit->fixcsum == TCPEDIT_FIXCSUM_DISABLE)
return 1;
return 0;

chksum_replace4(&ip_hdr->ip_sum, from, to);
return 0;
Expand Down