CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Thu Dec 21 08:59:27 UTC 2017 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.1 Log Message: fix offset/indent of list To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.12 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.13 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.12 Tue Mar 18 18:20:45 2014 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Thu Dec 21 08:59:27 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rfcomm_sppd.1,v 1.12 2014/03/18 18:20:45 riastradh Exp $ +.\" $NetBSD: rfcomm_sppd.1,v 1.13 2017/12/21 08:59:27 plunky Exp $ .\" .\" Copyright (c) 2006 Itronix Inc. .\" All rights reserved. @@ -122,7 +122,7 @@ is specified, the connection will be set Set connection link mode. Supported modes are: .Pp -.Bl -tag -compact -offset indent +.Bl -tag -compact -width encrypt -offset xx .It auth require devices be paired. .It encrypt @@ -145,7 +145,7 @@ is given, the default service class will be used. Known service classes are: .Pp -.Bl -tag -compact -offset indent +.Bl -tag -compact -width DUN -offset xx .It DUN Dialup Networking .It LAN
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: christos Date: Tue Jan 10 21:12:03 UTC 2017 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.c diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.16 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.17 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.16 Mon Dec 9 04:35:17 2013 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Tue Jan 10 16:12:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_sppd.c,v 1.16 2013/12/09 09:35:17 wiz Exp $ */ +/* $NetBSD: rfcomm_sppd.c,v 1.17 2017/01/10 21:12:03 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -62,9 +62,10 @@ __COPYRIGHT("@(#) Copyright (c) 2009 The Copyright (c) 2006 Itronix, Inc.\ Copyright (c) 2003 Maksim Yevmenkin m_evmen...@yahoo.com.\ All rights reserved."); -__RCSID("$NetBSD: rfcomm_sppd.c,v 1.16 2013/12/09 09:35:17 wiz Exp $"); +__RCSID("$NetBSD: rfcomm_sppd.c,v 1.17 2017/01/10 21:12:03 christos Exp $"); #include +#include #include #include
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Mon Jul 18 15:44:17 UTC 2011 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.c Log Message: only modify the termios structure when tty_in is verifiably a terminal To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.c diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.13 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.14 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.13 Wed Nov 3 08:27:27 2010 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Mon Jul 18 15:44:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_sppd.c,v 1.13 2010/11/03 08:27:27 plunky Exp $ */ +/* $NetBSD: rfcomm_sppd.c,v 1.14 2011/07/18 15:44:17 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -62,7 +62,7 @@ Copyright (c) 2006 Itronix, Inc.\ Copyright (c) 2003 Maksim Yevmenkin m_evmen...@yahoo.com.\ All rights reserved.); -__RCSID($NetBSD: rfcomm_sppd.c,v 1.13 2010/11/03 08:27:27 plunky Exp $); +__RCSID($NetBSD: rfcomm_sppd.c,v 1.14 2011/07/18 15:44:17 plunky Exp $); #include sys/param.h @@ -230,18 +230,20 @@ * be used directly with stdio */ if (tty == NULL) { - if (tcgetattr(tty_in, t) 0) - err(EXIT_FAILURE, tcgetattr); + if (isatty(tty_in)) { + if (tcgetattr(tty_in, t) 0) +err(EXIT_FAILURE, tcgetattr); + + memcpy(tio, t, sizeof(tio)); + t.c_lflag = ~(ECHO | ICANON); + t.c_iflag = ~(ICRNL); + + if (memcmp(tio, t, sizeof(tio))) { +if (tcsetattr(tty_in, TCSANOW, t) 0) + err(EXIT_FAILURE, tcsetattr); - memcpy(tio, t, sizeof(tio)); - t.c_lflag = ~(ECHO | ICANON); - t.c_iflag = ~(ICRNL); - - if (memcmp(tio, t, sizeof(tio))) { - if (tcsetattr(tty_in, TCSANOW, t) 0) -err(EXIT_FAILURE, tcsetattr); - - atexit(reset_tio); +atexit(reset_tio); + } } } else { if (daemon(0, 0) 0)
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Wed Nov 3 08:27:27 UTC 2010 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.1 rfcomm_sppd.c Log Message: In server mode, relax the requirement to specify a channel number. If one is not given, attempt to allocate the first unused one. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 cvs rdiff -u -r1.12 -r1.13 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.8 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.9 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.8 Tue Nov 2 19:44:09 2010 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Wed Nov 3 08:27:27 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: rfcomm_sppd.1,v 1.8 2010/11/02 19:44:09 plunky Exp $ +.\ $NetBSD: rfcomm_sppd.1,v 1.9 2010/11/03 08:27:27 plunky Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -65,7 +65,7 @@ .Op Fl p Ar psm .Op Fl s Ar service .Op Fl t Ar tty -.Brq Fl a Ar address | Fl c Ar channel +.Brq Fl a Ar address | Op Fl c Ar channel .Sh DESCRIPTION The .Nm @@ -87,7 +87,8 @@ .Ar service with the local SDP server and listens on the specified RFCOMM .Ar channel -for an incoming connection. +for an incoming connection, or the first unused channel if none +was given. .Pp The options are as follows: .Bl -tag -width .Fl c Ar channel @@ -100,8 +101,7 @@ utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .It Fl c Ar channel -Server mode. -Specify the RFCOMM channel number to listen on. +In server mode, specify the RFCOMM channel number to listen on. .Nm will register the service with the local .Xr sdpd 8 Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.c diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.12 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.13 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.12 Thu Sep 24 18:30:37 2009 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Wed Nov 3 08:27:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_sppd.c,v 1.12 2009/09/24 18:30:37 plunky Exp $ */ +/* $NetBSD: rfcomm_sppd.c,v 1.13 2010/11/03 08:27:27 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -62,7 +62,7 @@ Copyright (c) 2006 Itronix, Inc.\ Copyright (c) 2003 Maksim Yevmenkin m_evmen...@yahoo.com.\ All rights reserved.); -__RCSID($NetBSD: rfcomm_sppd.c,v 1.12 2009/09/24 18:30:37 plunky Exp $); +__RCSID($NetBSD: rfcomm_sppd.c,v 1.13 2010/11/03 08:27:27 plunky Exp $); #include sys/param.h @@ -128,7 +128,7 @@ bdaddr_copy(raddr, BDADDR_ANY); service = SP; tty = NULL; - channel = 0; + channel = RFCOMM_CHANNEL_ANY; psm = L2CAP_PSM_RFCOMM; lm = 0; @@ -149,7 +149,9 @@ case 'c': /* RFCOMM channel */ channel = strtoul(optarg, ep, 10); - if (*ep != '\0' || channel 1 || channel 30) + if (*ep != '\0' + || channel RFCOMM_CHANNEL_MIN + || channel RFCOMM_CHANNEL_MAX) errx(EXIT_FAILURE, Invalid channel: %s, optarg); break; @@ -200,10 +202,9 @@ /* * validate options: - * must have channel or remote address but not both + * cannot have remote address if channel was given */ - if ((channel == 0 bdaddr_any(raddr)) - || (channel != 0 !bdaddr_any(raddr))) + if (channel != RFCOMM_CHANNEL_ANY !bdaddr_any(raddr)) usage(); /* @@ -218,7 +219,7 @@ } /* open RFCOMM */ - if (channel == 0) + if (!bdaddr_any(raddr)) rfcomm = open_client(laddr, raddr, lm, psm, service); else rfcomm = open_server(laddr, psm, channel, lm, service); @@ -433,6 +434,12 @@ if (listen(sv, 1) 0) err(EXIT_FAILURE, listen()); + len = sizeof(sa); + if (getsockname(sv, (struct sockaddr *)sa, len) 0) + err(EXIT_FAILURE, getsockname()); + if (len != sizeof(sa)) + errx(EXIT_FAILURE, getsockname()); + /* Build SDP record */ rec.next = buffer; rec.end = buffer + sizeof(buffer); @@ -454,7 +461,7 @@ sdp_put_uint16(rec, psm); sdp_put_seq(rec, 5); sdp_put_uuid16(rec, SDP_UUID_PROTOCOL_RFCOMM); - sdp_put_uint8(rec, channel); + sdp_put_uint8(rec, sa.bt_channel); sdp_put_uint16(rec, SDP_ATTR_BROWSE_GROUP_LIST); sdp_put_seq(rec, 3); @@ -671,7 +678,7 @@ struct service *s; fprintf(stderr, Usage: %s [-d device] [-m mode] [-p psm] [-s service] [-t tty]\n - %*s {-a bdaddr | -c channel}\n + %*s {-a bdaddr | [-c channel]}\n \n Where:\n \t-a bdaddrremote device address\n
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: wiz Date: Wed Nov 3 12:21:51 UTC 2010 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.1 Log Message: Sort sections. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.9 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.10 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.9 Wed Nov 3 08:27:27 2010 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Wed Nov 3 12:21:50 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: rfcomm_sppd.1,v 1.9 2010/11/03 08:27:27 plunky Exp $ +.\ $NetBSD: rfcomm_sppd.1,v 1.10 2010/11/03 12:21:50 wiz Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -166,8 +166,6 @@ pair. Otherwise, stdin/stdout will be used. .El -.Sh EXIT STATUS -.Ex -std .Sh FILES .Bl -tag -width .Pa /dev/tty[p-sP-S][0-9a-v] -compact .It Pa /dev/pty[p-sP-S][0-9a-v] @@ -175,6 +173,8 @@ .It Pa /dev/tty[p-sP-S][0-9a-v] slave pseudo terminals .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES .Dl rfcomm_sppd -a 00:01:02:03:04:05 -s 1 -t /dev/ttyp1 .Pp
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Tue Nov 2 19:44:09 UTC 2010 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.1 Log Message: -s can be used in server mode too To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.7 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.8 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.7 Thu Sep 24 18:30:37 2009 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Tue Nov 2 19:44:09 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: rfcomm_sppd.1,v 1.7 2009/09/24 18:30:37 plunky Exp $ +.\ $NetBSD: rfcomm_sppd.1,v 1.8 2010/11/02 19:44:09 plunky Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -52,7 +52,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd September 24, 2009 +.Dd November 2, 2010 .Dt RFCOMM_SPPD 1 .Os .Sh NAME @@ -137,7 +137,7 @@ In client mode where Service Discovery is being used, this value will be ignored. .It Fl s Ar service -This is the service class that will be searched for on the remote device. +Name of service class to connect to or register. If no .Ar service is given, the default
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Thu Sep 24 18:30:37 UTC 2009 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.1 rfcomm_sppd.c Log Message: Add a new feature, allow to specify an alternative PSM value for the RFCOMM protocol to use in client or server mode. Also, handle the case where service search of the remote device returns non-standard PSM. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 cvs rdiff -u -r1.11 -r1.12 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.6 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.7 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.6 Sun Dec 2 20:41:40 2007 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Thu Sep 24 18:30:37 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: rfcomm_sppd.1,v 1.6 2007/12/02 20:41:40 wiz Exp $ +.\ $NetBSD: rfcomm_sppd.1,v 1.7 2009/09/24 18:30:37 plunky Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -52,7 +52,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd April 10, 2007 +.Dd September 24, 2009 .Dt RFCOMM_SPPD 1 .Os .Sh NAME @@ -62,6 +62,7 @@ .Nm .Op Fl d Ar device .Op Fl m Ar mode +.Op Fl p Ar psm .Op Fl s Ar service .Op Fl t Ar tty .Brq Fl a Ar address | Fl c Ar channel @@ -129,6 +130,12 @@ .It secure encryption, plus change of link key. .El +.It Fl p Ar psm +Specify the +.Qq Protocol/Service Multiplexer +value to be used for the RFCOMM protocol. +In client mode where Service Discovery is being used, this value +will be ignored. .It Fl s Ar service This is the service class that will be searched for on the remote device. If no Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.c diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.11 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.12 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.11 Thu May 21 14:44:01 2009 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Thu Sep 24 18:30:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_sppd.c,v 1.11 2009/05/21 14:44:01 plunky Exp $ */ +/* $NetBSD: rfcomm_sppd.c,v 1.12 2009/09/24 18:30:37 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -62,7 +62,7 @@ Copyright (c) 2006 Itronix, Inc.\ Copyright (c) 2003 Maksim Yevmenkin m_evmen...@yahoo.com.\ All rights reserved.); -__RCSID($NetBSD: rfcomm_sppd.c,v 1.11 2009/05/21 14:44:01 plunky Exp $); +__RCSID($NetBSD: rfcomm_sppd.c,v 1.12 2009/09/24 18:30:37 plunky Exp $); #include sys/param.h @@ -87,10 +87,10 @@ #include netbt/rfcomm.h int open_tty(const char *); -int open_client(bdaddr_t *, bdaddr_t *, int, const char *); -int open_server(bdaddr_t *, uint8_t, int, const char *); +int open_client(bdaddr_t *, bdaddr_t *, int, uintmax_t, const char *); +int open_server(bdaddr_t *, uint16_t, uint8_t, int, const char *); void copy_data(int, int); -int channel_lookup(const bdaddr_t *, const bdaddr_t *, uint16_t, uintmax_t *); +int service_search(const bdaddr_t *, const bdaddr_t *, uint16_t, uintmax_t *, uintmax_t *); void sighandler(int); void usage(void); void reset_tio(void); @@ -121,6 +121,7 @@ const char *service; char *ep, *tty; int lm, n, rfcomm, tty_in, tty_out; + uint16_t psm; uint8_t channel; bdaddr_copy(laddr, BDADDR_ANY); @@ -128,10 +129,11 @@ service = SP; tty = NULL; channel = 0; + psm = L2CAP_PSM_RFCOMM; lm = 0; /* Parse command line options */ - while ((n = getopt(argc, argv, a:c:d:hm:s:t:)) != -1) { + while ((n = getopt(argc, argv, a:c:d:hm:p:s:t:)) != -1) { switch (n) { case 'a': /* remote device address */ if (!bt_aton(optarg, raddr)) { @@ -170,6 +172,13 @@ break; + case 'p': /* PSM */ + psm = strtoul(optarg, ep, 0); + if (*ep != '\0' || L2CAP_PSM_INVALID(psm)) +errx(EXIT_FAILURE, Invalid PSM: %s, optarg); + + break; + case 's': /* service class */ service = optarg; break; @@ -210,9 +219,9 @@ /* open RFCOMM */ if (channel == 0) - rfcomm = open_client(laddr, raddr, lm, service); + rfcomm = open_client(laddr, raddr, lm, psm, service); else - rfcomm = open_server(laddr, channel, lm, service); + rfcomm = open_server(laddr, psm, channel, lm, service); /* * now we are ready to go, so either detach or maybe turn @@ -318,7 +327,7 @@ } int -open_client(bdaddr_t *laddr, bdaddr_t *raddr, int lm, const char *service) +open_client(bdaddr_t *laddr, bdaddr_t *raddr, int lm, uintmax_t psm, const char *service) { struct sockaddr_bt sa; struct service *s; @@ -337,7 +346,7 @@ } if (strcasecmp(s-name, service) == 0) { - error = channel_lookup(laddr, raddr, s-class, channel); + error = service_search(laddr, raddr, s-class, psm, channel); if (error != 0) errx(EXIT_FAILURE, %s: %s, s-name, strerror(error)); @@ -348,6 +357,9 @@ if (channel
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Thu May 21 14:44:01 UTC 2009 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.c Log Message: use system provided MAX(a, b) macro instead of defining our own To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.c diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.10 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.11 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.10 Tue May 12 18:43:35 2009 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Thu May 21 14:44:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_sppd.c,v 1.10 2009/05/12 18:43:35 plunky Exp $ */ +/* $NetBSD: rfcomm_sppd.c,v 1.11 2009/05/21 14:44:01 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -62,7 +62,9 @@ Copyright (c) 2006 Itronix, Inc.\ Copyright (c) 2003 Maksim Yevmenkin m_evmen...@yahoo.com.\ All rights reserved.); -__RCSID($NetBSD: rfcomm_sppd.c,v 1.10 2009/05/12 18:43:35 plunky Exp $); +__RCSID($NetBSD: rfcomm_sppd.c,v 1.11 2009/05/21 14:44:01 plunky Exp $); + +#include sys/param.h #include bluetooth.h #include ctype.h @@ -84,8 +86,6 @@ #include netbt/rfcomm.h -#define max(a, b) ((a) (b) ? (a) : (b)) - int open_tty(const char *); int open_client(bdaddr_t *, bdaddr_t *, int, const char *); int open_server(bdaddr_t *, uint8_t, int, const char *); @@ -248,7 +248,7 @@ openlog(getprogname(), LOG_PERROR | LOG_PID, LOG_DAEMON); syslog(LOG_INFO, Starting on %s..., (tty ? tty : stdio)); - n = max(tty_in, rfcomm) + 1; + n = MAX(tty_in, rfcomm) + 1; while (!done) { FD_ZERO(rdset); FD_SET(tty_in, rdset);
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Tue May 12 13:13:35 UTC 2009 Modified Files: src/usr.bin/rfcomm_sppd: Makefile Log Message: does no longer need libsdp To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/rfcomm_sppd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/Makefile diff -u src/usr.bin/rfcomm_sppd/Makefile:1.3 src/usr.bin/rfcomm_sppd/Makefile:1.4 --- src/usr.bin/rfcomm_sppd/Makefile:1.3 Thu May 7 18:08:55 2009 +++ src/usr.bin/rfcomm_sppd/Makefile Tue May 12 13:13:34 2009 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile,v 1.3 2009/05/07 18:08:55 plunky Exp $ +# $NetBSD: Makefile,v 1.4 2009/05/12 13:13:34 plunky Exp $ USE_FORT?= yes # network client/server PROG= rfcomm_sppd SRCS= rfcomm_sppd.c rfcomm_sdp.c -DPADD+= ${LIBBLUETOOTH} ${LIBSDP} -LDADD+= -lbluetooth -lsdp +DPADD+= ${LIBBLUETOOTH} +LDADD+= -lbluetooth CPPFLAGS+= -DSDP_COMPAT