summaryrefslogtreecommitdiffstats
path: root/pand/bnep.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-04-28 12:30:24 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-04-28 12:30:24 +0000
commit1c78dbe58cb701c7a0463b3bafadadb3d08461f1 (patch)
tree756ce5fe7db8ec34fb0a83c125e3cc61c40e773f /pand/bnep.c
parente343e0fee7fdaf96156fb35b431ddb0503755843 (diff)
Unify copyright and license information
Diffstat (limited to 'pand/bnep.c')
-rw-r--r--pand/bnep.c55
1 files changed, 33 insertions, 22 deletions
diff --git a/pand/bnep.c b/pand/bnep.c
index 6833f941..be0d492a 100644
--- a/pand/bnep.c
+++ b/pand/bnep.c
@@ -1,25 +1,36 @@
/*
- pand - Bluetooth PAN daemon for BlueZ
- Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License, version 2, as
- published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-/*
- * $Id$
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
+ * Copyright (C) 2002-2004 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
+ * SOFTWARE IS DISCLAIMED.
+ *
+ *
+ * $Id$
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -62,7 +73,7 @@ static struct {
int bnep_str2svc(char *svc, uint16_t *uuid)
{
int i;
- for (i=0; __svc[i].str; i++)
+ for (i = 0; __svc[i].str; i++)
if (!strcasecmp(svc, __svc[i].str)) {
*uuid = __svc[i].uuid;
return 0;
@@ -73,7 +84,7 @@ int bnep_str2svc(char *svc, uint16_t *uuid)
char *bnep_svc2str(uint16_t uuid)
{
int i;
- for (i=0; __svc[i].str; i++)
+ for (i = 0; __svc[i].str; i++)
if (__svc[i].uuid == uuid)
return __svc[i].str;
return NULL;
@@ -258,7 +269,7 @@ int bnep_create_connection(int sk, uint16_t role, uint16_t svc, char *dev)
req = (void *) pkt;
req->type = BNEP_CONTROL;
req->ctrl = BNEP_SETUP_CONN_REQ;
- req->uuid_size = 2; //16bit UUID
+ req->uuid_size = 2; /* 16bit UUID */
s = (void *) req->service;
s->dst = htons(svc);
s->src = htons(role);