X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fbsd%2Fdevice.c;h=be026b701d01a992b8abd181801685ba73b2172f;hp=bbd7c00efaf35e25f84bb416eeb9cd3f6b921de5;hb=a227843b739d279b63adcf3736ebb03d856080c4;hpb=c217d214f4f071c235bc7c463a1da6124e2570a6 diff --git a/src/bsd/device.c b/src/bsd/device.c index bbd7c00e..be026b70 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -13,9 +13,9 @@ 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 this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" @@ -59,8 +59,6 @@ static device_type_t device_type = DEVICE_TYPE_TUN; bool setup_device(void) { char *type; - cp(); - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) device = xstrdup(DEFAULT_DEVICE); @@ -165,8 +163,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - switch(device_type) { #ifdef HAVE_TUNEMU case DEVICE_TYPE_TUNEMU: @@ -184,8 +180,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - switch(device_type) { case DEVICE_TYPE_TUN: #ifdef HAVE_TUNEMU @@ -277,10 +271,7 @@ bool read_packet(vpn_packet_t *packet) { return true; } -bool write_packet(vpn_packet_t *packet) -{ - cp(); - +bool write_packet(vpn_packet_t *packet) { ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), packet->len, device_info); @@ -349,10 +340,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ - cp(); - +void dump_device_stats(void) { logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out);