Deleted Added
full compact
atm.c (65863) atm.c (71781)
1/*-
2 * Copyright (c) 2000 Jakob Stoklund Olesen <stoklund@taxidriver.dk>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Jakob Stoklund Olesen <stoklund@taxidriver.dk>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/ppp/atm.c 65863 2000-09-14 22:03:13Z brian $
26 * $FreeBSD: head/usr.sbin/ppp/atm.c 71781 2001-01-29 08:46:58Z brian $
27 */
28
29#include <sys/types.h>
30#include <sys/socket.h>
31#include <net/if.h>
32#include <netnatm/natm.h>
33
34#include <errno.h>

--- 39 unchanged lines hidden (view full) ---

74 return sizeof(struct atmdevice);
75}
76
77static ssize_t
78atm_Sendto(struct physical *p, const void *v, size_t n)
79{
80 ssize_t ret = write(p->fd, v, n);
81 if (ret < 0) {
27 */
28
29#include <sys/types.h>
30#include <sys/socket.h>
31#include <net/if.h>
32#include <netnatm/natm.h>
33
34#include <errno.h>

--- 39 unchanged lines hidden (view full) ---

74 return sizeof(struct atmdevice);
75}
76
77static ssize_t
78atm_Sendto(struct physical *p, const void *v, size_t n)
79{
80 ssize_t ret = write(p->fd, v, n);
81 if (ret < 0) {
82 log_Printf(LogDEBUG, "atm_Sendto(%d): %s\n", n, strerror(errno));
82 log_Printf(LogDEBUG, "atm_Sendto(%ld): %s\n", (long)n, strerror(errno));
83 return ret;
84 }
85 return ret;
86}
87
88static ssize_t
89atm_Recvfrom(struct physical *p, void *v, size_t n)
90{
91 ssize_t ret = read(p->fd, (char*)v, n);
92 if (ret < 0) {
83 return ret;
84 }
85 return ret;
86}
87
88static ssize_t
89atm_Recvfrom(struct physical *p, void *v, size_t n)
90{
91 ssize_t ret = read(p->fd, (char*)v, n);
92 if (ret < 0) {
93 log_Printf(LogDEBUG, "atm_Recvfrom(%d): %s\n", n, strerror(errno));
93 log_Printf(LogDEBUG, "atm_Recvfrom(%ld): %s\n", (long)n, strerror(errno));
94 return ret;
95 }
96 return ret;
97}
98
99static void
100atm_Free(struct physical *p)
101{

--- 133 unchanged lines hidden ---
94 return ret;
95 }
96 return ret;
97}
98
99static void
100atm_Free(struct physical *p)
101{

--- 133 unchanged lines hidden ---