btpand.c (7718ced0ea98ea5d1ece76c36a955eec9d97dc52) btpand.c (905033dc11714a0471d8fd790720304f6937613a)
1/* $NetBSD: btpand.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
2
3/*-
4 * Copyright (c) 2008 Iain Hibbert
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

49/* global variables */
50const char * control_path; /* -c <path> */
51const char * interface_name; /* -i <ifname> */
52const char * service_name; /* -s <service> */
53uint16_t service_class;
54
55bdaddr_t local_bdaddr; /* -d <addr> */
56bdaddr_t remote_bdaddr; /* -a <addr> */
1/* $NetBSD: btpand.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
2
3/*-
4 * Copyright (c) 2008 Iain Hibbert
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

49/* global variables */
50const char * control_path; /* -c <path> */
51const char * interface_name; /* -i <ifname> */
52const char * service_name; /* -s <service> */
53uint16_t service_class;
54
55bdaddr_t local_bdaddr; /* -d <addr> */
56bdaddr_t remote_bdaddr; /* -a <addr> */
57uint16_t l2cap_psm = 15; /* -p <psm> */
58int l2cap_mode = 0; /* -m <mode> */
57uint16_t l2cap_psm; /* -p <psm> */
58int l2cap_mode; /* -m <mode> */
59
60int server_limit; /* -n <limit> */
61
62static const struct {
63 const char * name;
64 uint16_t class;
65 const char * desc;
66} services[] = {

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

172 if (!bdaddr_any(&remote_bdaddr) && (server_limit != 0 ||
173 control_path != 0 || (service_name != NULL && l2cap_psm != 0)))
174 usage();
175
176 /* default options */
177 if (interface_name == NULL)
178 interface_name = "/dev/tap";
179
59
60int server_limit; /* -n <limit> */
61
62static const struct {
63 const char * name;
64 uint16_t class;
65 const char * desc;
66} services[] = {

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

172 if (!bdaddr_any(&remote_bdaddr) && (server_limit != 0 ||
173 control_path != 0 || (service_name != NULL && l2cap_psm != 0)))
174 usage();
175
176 /* default options */
177 if (interface_name == NULL)
178 interface_name = "/dev/tap";
179
180 if (l2cap_psm == 0)
181 l2cap_psm = L2CAP_PSM_BNEP;
182
180 if (bdaddr_any(&remote_bdaddr) && server_limit == 0) {
181 if (service_class == SDP_SERVICE_CLASS_PANU)
182 server_limit = 1;
183 else
184 server_limit = 7;
185 }
186
187#ifdef L2CAP_LM_MASTER

--- 103 unchanged lines hidden ---
183 if (bdaddr_any(&remote_bdaddr) && server_limit == 0) {
184 if (service_class == SDP_SERVICE_CLASS_PANU)
185 server_limit = 1;
186 else
187 server_limit = 7;
188 }
189
190#ifdef L2CAP_LM_MASTER

--- 103 unchanged lines hidden ---