kill dead code
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue Jul 07 13:05:23 2009 +0200 (7 months ago)
changeset 46875b92bfa1abee
parent 4686 b4c5ad3c5fa1
child 4688 010500125723
kill dead code
src/internet-stack/ipv4-checksum.cc
src/internet-stack/ipv4-checksum.h
src/internet-stack/wscript
     1.1 --- a/src/internet-stack/ipv4-checksum.cc	Tue Jul 07 13:03:21 2009 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,52 +0,0 @@
     1.4 -/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
     1.5 -/*
     1.6 - * Copyright (c) 2005,2006,2007 INRIA
     1.7 - *
     1.8 - * This program is free software; you can redistribute it and/or modify
     1.9 - * it under the terms of the GNU General Public License version 2 as
    1.10 - * published by the Free Software Foundation;
    1.11 - *
    1.12 - * This program is distributed in the hope that it will be useful,
    1.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.15 - * GNU General Public License for more details.
    1.16 - *
    1.17 - * You should have received a copy of the GNU General Public License
    1.18 - * along with this program; if not, write to the Free Software
    1.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.20 - *
    1.21 - * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
    1.22 - */
    1.23 -#include "ipv4-checksum.h"
    1.24 -
    1.25 -namespace ns3 {
    1.26 -
    1.27 -uint16_t 
    1.28 -Ipv4ChecksumCalculate (uint16_t checksum, uint8_t *buffer, uint16_t size)
    1.29 -{
    1.30 -  /* see RFC 1071 to understand this code. */
    1.31 -  uint32_t sum = checksum;
    1.32 -  uint16_t *data = (uint16_t *) buffer;
    1.33 -  for (uint16_t i = 0; i < (size/2); i++) {
    1.34 -    sum += data[i];
    1.35 -  }
    1.36 -  if ((size % 2) != 0) {
    1.37 -    uint8_t tmpBuf[2];
    1.38 -    tmpBuf[0] = buffer[size-1];
    1.39 -    tmpBuf[1] = 0;
    1.40 -    data = (uint16_t *)tmpBuf;
    1.41 -    sum += *data;
    1.42 -  }
    1.43 -  while (sum >> 16) {
    1.44 -    sum = (sum & 0xffff) + (sum >> 16);
    1.45 -  }
    1.46 -  return sum;
    1.47 -}
    1.48 -
    1.49 -uint16_t 
    1.50 -Ipv4ChecksumComplete (uint16_t checksum)
    1.51 -{
    1.52 -  return ~checksum;
    1.53 -}
    1.54 -
    1.55 -}; //namespace ns3
     2.1 --- a/src/internet-stack/ipv4-checksum.h	Tue Jul 07 13:03:21 2009 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,33 +0,0 @@
     2.4 -/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
     2.5 -/*
     2.6 - * Copyright (c) 2005,2006,2007 INRIA
     2.7 - *
     2.8 - * This program is free software; you can redistribute it and/or modify
     2.9 - * it under the terms of the GNU General Public License version 2 as
    2.10 - * published by the Free Software Foundation;
    2.11 - *
    2.12 - * This program is distributed in the hope that it will be useful,
    2.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.15 - * GNU General Public License for more details.
    2.16 - *
    2.17 - * You should have received a copy of the GNU General Public License
    2.18 - * along with this program; if not, write to the Free Software
    2.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2.20 - *
    2.21 - * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
    2.22 - */
    2.23 -#ifndef IPV4_CHECKSUM_H
    2.24 -#define IPV4_CHECKSUM_H
    2.25 -
    2.26 -#include <stdint.h>
    2.27 -
    2.28 -namespace ns3 {
    2.29 -
    2.30 -uint16_t Ipv4ChecksumCalculate (uint16_t checksum, uint8_t *buffer, uint16_t size);
    2.31 -
    2.32 -uint16_t Ipv4ChecksumComplete (uint16_t checksum);
    2.33 -
    2.34 -}; //namespace ns3
    2.35 -
    2.36 -#endif /* IPV4_CHECKSUM_H */
     3.1 --- a/src/internet-stack/wscript	Tue Jul 07 13:03:21 2009 +0200
     3.2 +++ b/src/internet-stack/wscript	Tue Jul 07 13:05:23 2009 +0200
     3.3 @@ -78,7 +78,6 @@
     3.4          'ipv4-l4-protocol.cc',
     3.5          'udp-header.cc',
     3.6          'tcp-header.cc',
     3.7 -        'ipv4-checksum.cc',
     3.8          'ipv4-interface.cc',
     3.9          'ipv4-l3-protocol.cc',
    3.10          'ipv4-end-point.cc',