diff options
Diffstat (limited to 'network/common.c')
| -rw-r--r-- | network/common.c | 16 | 
1 files changed, 13 insertions, 3 deletions
| diff --git a/network/common.c b/network/common.c index 7fbfee91..ec10cc34 100644 --- a/network/common.c +++ b/network/common.c @@ -60,9 +60,9 @@ static struct {  	const char	*uuid128;	/* UUID 128 */  	uint16_t	id;		/* Service class identifier */  } __svc[] = { -	{ "PANU",	PANU_UUID,	BNEP_SVC_PANU	}, -	{ "GN",		GN_UUID,	BNEP_SVC_GN	}, -	{ "NAP",	NAP_UUID,	BNEP_SVC_NAP	}, +	{ "panu",	PANU_UUID,	BNEP_SVC_PANU	}, +	{ "gn",		GN_UUID,	BNEP_SVC_GN	}, +	{ "nap",	NAP_UUID,	BNEP_SVC_NAP	},  	{ NULL }  }; @@ -101,6 +101,16 @@ const char *bnep_uuid(uint16_t id)  	return NULL;  } +const char *bnep_name(uint16_t id) +{ +	int i; + +	for (i = 0; __svc[i].name; i++) +		if (__svc[i].id == id) +			return __svc[i].name; +	return NULL; +} +  int bnep_init(void)  {  	ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP); | 
