forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information
Showing
23 changed files
with
367 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
/* SCTP kernel reference Implementation | ||
* Copyright (c) 1999-2001 Motorola, Inc. | ||
* Copyright (c) 2001-2003 International Business Machines, Corp. | ||
* | ||
* | ||
* This file is part of the SCTP kernel reference Implementation | ||
* | ||
* | ||
* SCTP Checksum functions | ||
* | ||
* The SCTP reference implementation is free software; | ||
* you can redistribute it and/or modify it under the terms of | ||
* | ||
* The SCTP reference implementation is free software; | ||
* you can redistribute it and/or modify it under the terms of | ||
* the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2, or (at your option) | ||
* any later version. | ||
* | ||
* The SCTP reference implementation is distributed in the hope that it | ||
* | ||
* The SCTP reference implementation is distributed in the hope that it | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
* ************************ | ||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU General Public License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with GNU CC; see the file COPYING. If not, write to | ||
* the Free Software Foundation, 59 Temple Place - Suite 330, | ||
* Boston, MA 02111-1307, USA. | ||
* | ||
* Boston, MA 02111-1307, USA. | ||
* | ||
* Please send any bug reports or fixes you make to the | ||
* email address(es): | ||
* lksctp developers <[email protected]> | ||
* | ||
* | ||
* Or submit a bug report through the following website: | ||
* http://www.sf.net/projects/lksctp | ||
* | ||
* Written or modified by: | ||
* Dinakaran Joseph | ||
* Written or modified by: | ||
* Dinakaran Joseph | ||
* Jon Grimm <[email protected]> | ||
* Sridhar Samudrala <[email protected]> | ||
* | ||
* | ||
* Any bugs reported given to us we will try to fix... any fixes shared will | ||
* be incorporated into the next SCTP release. | ||
*/ | ||
|
@@ -135,10 +135,10 @@ static const __u32 crc_c[256] = { | |
0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, | ||
0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351, | ||
}; | ||
|
||
__u32 sctp_start_cksum(__u8 *buffer, __u16 length) | ||
{ | ||
__u32 crc32 = ~(__u32) 0; | ||
__u32 crc32 = ~(__u32) 0; | ||
__u32 i; | ||
|
||
/* Optimize this routine to be SCTP specific, knowing how | ||
|
@@ -147,7 +147,7 @@ __u32 sctp_start_cksum(__u8 *buffer, __u16 length) | |
|
||
/* Calculate CRC up to the checksum. */ | ||
for (i = 0; i < (sizeof(struct sctphdr) - sizeof(__u32)); i++) | ||
CRC32C(crc32, buffer[i]); | ||
CRC32C(crc32, buffer[i]); | ||
|
||
/* Skip checksum field of the header. */ | ||
for (i = 0; i < sizeof(__u32); i++) | ||
|
@@ -175,13 +175,13 @@ __u32 sctp_update_copy_cksum(__u8 *to, __u8 *from, __u16 length, __u32 crc32) | |
__u32 i; | ||
__u32 *_to = (__u32 *)to; | ||
__u32 *_from = (__u32 *)from; | ||
|
||
for (i = 0; i < (length/4); i++) { | ||
_to[i] = _from[i]; | ||
CRC32C(crc32, from[i*4]); | ||
CRC32C(crc32, from[i*4+1]); | ||
CRC32C(crc32, from[i*4+2]); | ||
CRC32C(crc32, from[i*4+3]); | ||
CRC32C(crc32, from[i*4+3]); | ||
} | ||
|
||
return crc32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,48 +3,48 @@ | |
* Copyright (c) 1999-2000 Cisco, Inc. | ||
* Copyright (c) 1999-2001 Motorola, Inc. | ||
* Copyright (c) 2001 Intel Corp. | ||
* | ||
* | ||
* This file is part of the SCTP kernel reference Implementation | ||
* | ||
* | ||
* This file is part of the implementation of the add-IP extension, | ||
* based on <draft-ietf-tsvwg-addip-sctp-02.txt> June 29, 2001, | ||
* for the SCTP kernel reference Implementation. | ||
* | ||
* | ||
* This file converts numerical ID value to alphabetical names for SCTP | ||
* terms such as chunk type, parameter time, event type, etc. | ||
* | ||
* The SCTP reference implementation is free software; | ||
* you can redistribute it and/or modify it under the terms of | ||
* | ||
* The SCTP reference implementation is free software; | ||
* you can redistribute it and/or modify it under the terms of | ||
* the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2, or (at your option) | ||
* any later version. | ||
* | ||
* The SCTP reference implementation is distributed in the hope that it | ||
* | ||
* The SCTP reference implementation is distributed in the hope that it | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
* ************************ | ||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU General Public License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with GNU CC; see the file COPYING. If not, write to | ||
* the Free Software Foundation, 59 Temple Place - Suite 330, | ||
* Boston, MA 02111-1307, USA. | ||
* | ||
* Boston, MA 02111-1307, USA. | ||
* | ||
* Please send any bug reports or fixes you make to the | ||
* email address(es): | ||
* lksctp developers <[email protected]> | ||
* | ||
* | ||
* Or submit a bug report through the following website: | ||
* http://www.sf.net/projects/lksctp | ||
* | ||
* Written or modified by: | ||
* Written or modified by: | ||
* La Monte H.P. Yarroll <[email protected]> | ||
* Karl Knutson <[email protected]> | ||
* Xingang Guo <[email protected]> | ||
* Jon Grimm <[email protected]> | ||
* Daisy Chang <[email protected]> | ||
* Sridhar Samudrala <[email protected]> | ||
* | ||
* | ||
* Any bugs reported given to us we will try to fix... any fixes shared will | ||
* be incorporated into the next SCTP release. | ||
*/ | ||
|
@@ -81,7 +81,7 @@ const char *sctp_cname(const sctp_subtype_t cid) | |
return "illegal chunk id"; | ||
if (cid.chunk <= SCTP_CID_BASE_MAX) | ||
return sctp_cid_tbl[cid.chunk]; | ||
|
||
switch (cid.chunk) { | ||
case SCTP_CID_ASCONF: | ||
return "ASCONF"; | ||
|
@@ -154,7 +154,7 @@ const char *sctp_pname(const sctp_subtype_t id) | |
|
||
static const char *sctp_other_tbl[] = { | ||
"NO_PENDING_TSN", | ||
"ICMP_PROTO_UNREACH", | ||
"ICMP_PROTO_UNREACH", | ||
}; | ||
|
||
/* Lookup "other" debug name. */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.