Home
last modified time | relevance | path

Searched refs:nbuf (Results 1 – 22 of 22) sorted by relevance

/haiku/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/
H A Dh2util.cpp23 nb_get_whole_buffer(net_buffer* nbuf) in nb_get_whole_buffer() argument
30 if (nbuf->COOKIEFIELD != NULL) in nb_get_whole_buffer()
31 return (void*)nbuf->COOKIEFIELD; in nb_get_whole_buffer()
33 err = nb->direct_access(nbuf, 0, nbuf->size, &conPointer); in nb_get_whole_buffer()
39 nbuf->COOKIEFIELD = (uint32) malloc(nbuf->size); in nb_get_whole_buffer()
40 if (nbuf->COOKIEFIELD == NULL) in nb_get_whole_buffer()
43 err = nb->write(nbuf, 0, (void*) nbuf->COOKIEFIELD, nbuf->size); in nb_get_whole_buffer()
47 conPointer = (void*)nbuf->COOKIEFIELD; in nb_get_whole_buffer()
54 free((void*) nbuf->COOKIEFIELD); in nb_get_whole_buffer()
62 nb_destroy(net_buffer* nbuf) in nb_destroy() argument
[all …]
H A Dh2util.h16 #define SET_DEVICE(nbuf, hid) \ argument
17 (nbuf->DEVICEFIELD=(nbuf->DEVICEFIELD & 0xFFFFFF00) | (hid & 0xFF))
18 #define GET_DEVICE(nbuf) fetch_device(NULL, (nbuf->DEVICEFIELD&0xFF)) argument
22 void* nb_get_whole_buffer(net_buffer* nbuf);
23 void nb_destroy(net_buffer* nbuf);
24 size_t get_expected_size(net_buffer* nbuf);
H A Dh2upper.cpp26 net_buffer* nbuf; local
64 nbuf = (net_buffer*)
66 err = submit_tx_acl(bdev, nbuf);
71 nbuf);
106 net_buffer* nbuf = (net_buffer*) buf;
108 btDevices->receive_data(bdev->ndev, &nbuf);
118 send_packet(hci_id hid, bt_packet_t type, net_buffer* nbuf) argument
129 if (nbuf != NULL) {
130 if (type != nbuf->protocol) // a bit strict maybe
137 list_add_item(&bdev->nbuffersTx[type], nbuf);
H A Dh2transactions.cpp221 net_buffer* nbuf = (net_buffer*)cookie; in acl_tx_complete() local
222 bt_usb_dev* bdev = GET_DEVICE(nbuf); in acl_tx_complete()
234 nb_destroy(nbuf); in acl_tx_complete()
280 submit_tx_acl(bt_usb_dev* bdev, net_buffer* nbuf) in submit_tx_acl() argument
285 SET_DEVICE(nbuf, bdev->hdev); in submit_tx_acl()
297 error = usb->queue_bulk(bdev->bulk_out_ep->handle, nb_get_whole_buffer(nbuf), in submit_tx_acl()
298 nbuf->size, acl_tx_complete, (void*)nbuf); in submit_tx_acl()
H A Dh2upper.h15 status_t send_packet(hci_id hid, bt_packet_t type, net_buffer* nbuf);
H A Dh2transactions.h17 status_t submit_tx_acl(bt_usb_dev* bdev, net_buffer* nbuf);
H A Dh2generic.cpp49 status_t submit_nbuffer(hci_id hid, net_buffer* nbuf);
431 submit_nbuffer(hci_id hid, net_buffer* nbuf) in submit_nbuffer() argument
438 nbuf, bdev); in submit_nbuffer()
441 switch (nbuf->protocol) { in submit_nbuffer()
447 return submit_tx_acl(bdev, nbuf); in submit_nbuffer()
/haiku/src/add-ons/kernel/bluetooth/hci/
H A Dacl.cpp34 AclAssembly(net_buffer* nbuf, hci_id hid) in AclAssembly() argument
39 if (nbuf->size < sizeof(struct hci_acl_header)) { in AclAssembly()
41 __func__, nbuf->size); in AclAssembly()
42 gBufferModule->free(nbuf); in AclAssembly()
47 NetBufferHeaderReader<struct hci_acl_header> aclHeader(nbuf); in AclAssembly()
50 gBufferModule->free(nbuf); in AclAssembly()
81 gBufferModule->free(nbuf); in AclAssembly()
97 if (nbuf->size < sizeof(l2cap_basic_header)) { in AclAssembly()
99 "\n", __func__, nbuf->size); in AclAssembly()
100 gBufferModule->free(nbuf); in AclAssembly()
[all …]
H A Dbluetooth.cpp101 net_buffer* nbuf = bluetoothDevice->fBuffersRx[type]; in Assemble() local
107 if (nbuf == NULL) { in Assemble()
124 nbuf = gBufferModule->create( in Assemble()
126 bluetoothDevice->fBuffersRx[type] = nbuf; in Assemble()
128 nbuf->protocol = type; in Assemble()
145 nbuf = gBufferModule->create( in Assemble()
147 bluetoothDevice->fBuffersRx[type] = nbuf; in Assemble()
149 nbuf->protocol = type; in Assemble()
169 currentPacketLen = bluetoothDevice->fExpectedPacketSize[type] - nbuf->size; in Assemble()
171 if (nbuf != NULL) { in Assemble()
[all …]
/haiku/src/tests/system/libroot/posix/
H A Dtst-swprintf.c6 #define nbuf (sizeof (buf) / sizeof (buf[0])) macro
12 { nbuf, "hello world", 11 },
15 { nbuf, "", 0 }
26 n = swprintf(buf, nbuf,L"Hello %s" , "world"); in main()
38 n = swprintf(buf, nbuf, L"Is this >%g< 3.1?", 3.1); in main()
65 if (swprintf(buf, nbuf, L"%.0s", "foo") != 0 || wcslen(buf) != 0) { in main()
67 nbuf); in main()
71 if (swprintf(buf, nbuf, L"%.0ls", L"foo") != 0 || wcslen(buf) != 0) { in main()
73 nbuf); in main()
/haiku/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/
H A Dif_ath_descdma.c238 const char *name, int ds_size, int nbuf, int ndesc) in ath_descdma_setup() argument
250 nbuf * ndesc); in ath_descdma_setup()
260 bsize = sizeof(struct ath_buf) * nbuf; in ath_descdma_setup()
271 for (i = 0; i < nbuf; i++, bf++, ds += (ndesc * dd->dd_descsize)) { in ath_descdma_setup()
327 const char *name, int nbuf, int rx_status_len) in ath_descdma_setup_rx_edma() argument
333 __func__, name, nbuf); in ath_descdma_setup_rx_edma()
344 dd->dd_desc_len = rx_status_len * nbuf; in ath_descdma_setup_rx_edma()
348 bsize = sizeof(struct ath_buf) * nbuf; in ath_descdma_setup_rx_edma()
360 for (i = 0; i < nbuf; i++, bf++) { in ath_descdma_setup_rx_edma()
H A Dif_ath_descdma.h36 ath_bufhead *head, const char *name, int ds_size, int nbuf,
40 int nbuf, int desclen);
/haiku/headers/os/bluetooth/HCI/
H A DbtHCI_transport.h65 status_t (*SendACL)(hci_id hciId, net_buffer* nbuf);
66 status_t (*SendSCO)(hci_id hciId, net_buffer* nbuf);
67 status_t (*SendESCO)(hci_id hciId, net_buffer* nbuf);
/haiku/src/system/libnetwork/netresolv/resolv/
H A Dres_query.c363 char nbuf[MAXDNAME]; in res_nquerydomain() local
364 const char *longname = nbuf; in res_nquerydomain()
383 strncpy(nbuf, name, n); in res_nquerydomain()
384 nbuf[n] = '\0'; in res_nquerydomain()
394 sprintf(nbuf, "%s.%s", name, domain); in res_nquerydomain()
H A Dres_debug.c676 char *nbuf = p_option_nbuf; in p_option() local
711 default: sprintf(nbuf, "?0x%lx?", (u_long)option); in p_option()
712 return (nbuf); in p_option()
721 char *nbuf = p_time_nbuf; in p_time() local
723 if (ns_format_ttl((u_long)value, nbuf, sizeof nbuf) < 0) in p_time()
724 sprintf(nbuf, "%u", value); in p_time()
725 return (nbuf); in p_time()
/haiku/src/kits/storage/mime/
H A DTextSnifferAddon.cpp148 unsigned char *nbuf = NULL; in file_ascmagic() local
173 if ((nbuf = (unsigned char*)malloc((nbytes + 1) * sizeof(nbuf[0]))) == NULL) in file_ascmagic()
209 from_ebcdic(buf, nbytes, nbuf); in file_ascmagic()
211 if (looks_ascii(nbuf, nbytes, ubuf, &ulen)) { in file_ascmagic()
215 } else if (looks_latin1(nbuf, nbytes, ubuf, &ulen)) { in file_ascmagic()
344 if (nbuf) in file_ascmagic()
345 free(nbuf); in file_ascmagic()
/haiku/src/add-ons/kernel/drivers/network/ether/pcnet/dev/le/
H A Dlance.c107 int i, nbuf; in lance_config() local
172 nbuf = sc->sc_memsize / LEBLEN; in lance_config()
173 sc->sc_ntbuf = nbuf / 5; in lance_config()
174 sc->sc_nrbuf = nbuf - sc->sc_ntbuf; in lance_config()
/haiku/src/bin/network/ftpd/
H A Dftpd.c3275 char nbuf[MAXPATHLEN]; in send_file_list() local
3293 snprintf(nbuf, sizeof(nbuf), in send_file_list()
3300 if (simple || (stat(nbuf, &st) == 0 && in send_file_list()
3309 if (nbuf[0] == '.' && nbuf[1] == '/') in send_file_list()
3310 fprintf(dout, "%s%s\n", &nbuf[2], in send_file_list()
3313 fprintf(dout, "%s%s\n", nbuf, in send_file_list()
3318 byte_count += strlen(nbuf) + in send_file_list()
/haiku/src/system/libnetwork/netresolv/net/
H A Dgetaddrinfo.c2850 char nbuf[MAXDNAME]; local
2851 const char *longname = nbuf;
2868 if (n + 1 > sizeof(nbuf)) {
2873 strncpy(nbuf, name, n);
2874 nbuf[n] = '\0';
2880 if (n + 1 + d + 1 > sizeof(nbuf)) {
2884 snprintf(nbuf, sizeof(nbuf), "%s.%s", name, domain);
/haiku/src/add-ons/kernel/drivers/network/wlan/marvell88w8335/dev/malo/
H A Dif_malo.c436 int nbuf, size_t bufsize, int ndesc, size_t descsize) in malo_desc_setup() argument
443 __func__, name, nbuf, (uintmax_t) bufsize, in malo_desc_setup()
447 dd->dd_desc_len = nbuf * ndesc * descsize; in malo_desc_setup()
476 "error %u\n", nbuf * ndesc, dd->dd_name, error); in malo_desc_setup()
/haiku/src/add-ons/kernel/drivers/network/ether/marvell_yukon/dev/msk/
H A Dif_msk.c698 int i, nbuf, prod; in msk_init_rx_ring() local
714 nbuf = MSK_RX_BUF_CNT; in msk_init_rx_ring()
737 nbuf--; in msk_init_rx_ring()
739 for (i = 0; i < nbuf; i++) { in msk_init_rx_ring()
765 int i, nbuf, prod; in msk_init_jumbo_rx_ring() local
782 nbuf = MSK_RX_BUF_CNT; in msk_init_jumbo_rx_ring()
805 nbuf--; in msk_init_jumbo_rx_ring()
807 for (i = 0; i < nbuf; i++) { in msk_init_jumbo_rx_ring()
/haiku/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/dev/mwl/
H A Dif_mwl.c1922 int nbuf, size_t bufsize, int ndesc, size_t descsize) in mwl_desc_setup() argument
1929 __func__, name, nbuf, (uintmax_t) bufsize, in mwl_desc_setup()
1933 dd->dd_desc_len = nbuf * ndesc * descsize; in mwl_desc_setup()
1961 "error %u\n", nbuf * ndesc, dd->dd_name, error); in mwl_desc_setup()