Diff for /embedaddon/libnet/src/libnet_crc.c between versions 1.1 and 1.1.1.3

version 1.1, 2012/02/21 22:14:23 version 1.1.1.3, 2023/09/27 11:11:38
Line 30 Line 30
  *   *
  */   */
   
#if (HAVE_CONFIG_H)#include "common.h"
#include "../include/config.h" 
#endif 
#if (!(_WIN32) || (__CYGWIN__))  
#include "../include/libnet.h" 
#else 
#include "../include/win32/libnet.h" 
#endif 
   
   
 /* CRC routines based off of sample code in appendix of RFC 2083 */  /* CRC routines based off of sample code in appendix of RFC 2083 */
static u_int crc_table[256] =static uint32_t crc_table[256] =
 {  {
     0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,      0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
     0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,      0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
Line 95  static u_int crc_table[256] = Line 87  static u_int crc_table[256] =
  *  CRC generator G(x) is the sum of x^n for   *  CRC generator G(x) is the sum of x^n for
  *      n = 32, 26, 23, 22, 16, 12, 11, 10, 8, 7, 5, 4, 2, 1, 0   *      n = 32, 26, 23, 22, 16, 12, 11, 10, 8, 7, 5, 4, 2, 1, 0
  */   */
u_int32_tuint32_t
libnet_compute_crc(u_int8_t *buf, u_int32_t len)libnet_compute_crc(uint8_t *buf, uint32_t len)
 {  {
    u_int32_t val;    uint32_t val;
   
     val = ~0;      val = ~0;
     while (len--)      while (len--)
Line 109  libnet_compute_crc(u_int8_t *buf, u_int32_t len) Line 101  libnet_compute_crc(u_int8_t *buf, u_int32_t len)
     return (~val);      return (~val);
 }  }
   
/**
/* EOF */ * Local Variables:
  *  indent-tabs-mode: nil
  *  c-file-style: "stroustrup"
  * End:
  */

Removed from v.1.1  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>