Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 198) sorted by relevance

12345678

/net/bridge/
Dbr_stp_bpdu.c81 unsigned char buf[35]; in br_send_config_bpdu() local
86 buf[0] = 0; in br_send_config_bpdu()
87 buf[1] = 0; in br_send_config_bpdu()
88 buf[2] = 0; in br_send_config_bpdu()
89 buf[3] = BPDU_TYPE_CONFIG; in br_send_config_bpdu()
90 buf[4] = (bpdu->topology_change ? 0x01 : 0) | in br_send_config_bpdu()
92 buf[5] = bpdu->root.prio[0]; in br_send_config_bpdu()
93 buf[6] = bpdu->root.prio[1]; in br_send_config_bpdu()
94 buf[7] = bpdu->root.addr[0]; in br_send_config_bpdu()
95 buf[8] = bpdu->root.addr[1]; in br_send_config_bpdu()
[all …]
Dbr_sysfs_br.c28 const char *buf, size_t len, in store_bridge_parm() argument
39 val = simple_strtoul(buf, &endp, 0); in store_bridge_parm()
40 if (endp == buf) in store_bridge_parm()
56 struct device_attribute *attr, char *buf) in forward_delay_show() argument
59 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); in forward_delay_show()
64 const char *buf, size_t len) in forward_delay_store() argument
66 return store_bridge_parm(d, buf, len, br_set_forward_delay); in forward_delay_store()
71 char *buf) in hello_time_show() argument
73 return sprintf(buf, "%lu\n", in hello_time_show()
78 struct device_attribute *attr, const char *buf, in hello_time_store() argument
[all …]
Dbr_sysfs_if.c44 static ssize_t show_##_name(struct net_bridge_port *p, char *buf) \
46 return sprintf(buf, "%d\n", !!(p->flags & _mask)); \
74 static ssize_t show_path_cost(struct net_bridge_port *p, char *buf) in show_path_cost() argument
76 return sprintf(buf, "%d\n", p->path_cost); in show_path_cost()
82 static ssize_t show_priority(struct net_bridge_port *p, char *buf) in show_priority() argument
84 return sprintf(buf, "%d\n", p->priority); in show_priority()
90 static ssize_t show_designated_root(struct net_bridge_port *p, char *buf) in show_designated_root() argument
92 return br_show_bridge_id(buf, &p->designated_root); in show_designated_root()
96 static ssize_t show_designated_bridge(struct net_bridge_port *p, char *buf) in show_designated_bridge() argument
98 return br_show_bridge_id(buf, &p->designated_bridge); in show_designated_bridge()
[all …]
/net/sunrpc/
Dxdr.c124 xdr_terminate_string(struct xdr_buf *buf, const u32 len) in xdr_terminate_string() argument
128 kaddr = kmap_atomic(buf->pages[0]); in xdr_terminate_string()
129 kaddr[buf->page_base + len] = '\0'; in xdr_terminate_string()
135 xdr_buf_pagecount(struct xdr_buf *buf) in xdr_buf_pagecount() argument
137 if (!buf->page_len) in xdr_buf_pagecount()
139 return (buf->page_base + buf->page_len + PAGE_SIZE - 1) >> PAGE_SHIFT; in xdr_buf_pagecount()
143 xdr_alloc_bvec(struct xdr_buf *buf, gfp_t gfp) in xdr_alloc_bvec() argument
145 size_t i, n = xdr_buf_pagecount(buf); in xdr_alloc_bvec()
147 if (n != 0 && buf->bvec == NULL) { in xdr_alloc_bvec()
148 buf->bvec = kmalloc_array(n, sizeof(buf->bvec[0]), gfp); in xdr_alloc_bvec()
[all …]
Daddr.c29 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
40 return snprintf(buf, buflen, "::"); in rpc_ntop6_noscopeid()
48 return snprintf(buf, buflen, "::1"); in rpc_ntop6_noscopeid()
57 return snprintf(buf, buflen, "::ffff:%pI4", in rpc_ntop6_noscopeid()
63 return snprintf(buf, buflen, "%pI6c", addr); in rpc_ntop6_noscopeid()
67 char *buf, const size_t buflen) in rpc_ntop6() argument
74 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
92 strcat(buf, scopebuf); in rpc_ntop6()
99 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
105 char *buf, const size_t buflen) in rpc_ntop6() argument
[all …]
/net/mac80211/
Ddebugfs_sta.c87 char buf[16 * NUM_WLAN_STA_FLAGS], *pos = buf; in sta_flags_read() local
88 char *end = buf + sizeof(buf) - 1; in sta_flags_read()
100 return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); in sta_flags_read()
109 char buf[17*IEEE80211_NUM_ACS], *p = buf; in sta_num_ps_buf_frames_read() local
113 p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, in sta_num_ps_buf_frames_read()
116 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_num_ps_buf_frames_read()
123 char buf[15*IEEE80211_NUM_TIDS], *p = buf; in sta_last_seq_ctrl_read() local
127 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", in sta_last_seq_ctrl_read()
129 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_last_seq_ctrl_read()
130 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_last_seq_ctrl_read()
[all …]
Ddebugfs_key.c73 char buf[15]; in key_algorithm_read() local
77 sprintf(buf, "%.2x-%.2x-%.2x:%d\n", in key_algorithm_read()
79 return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); in key_algorithm_read()
122 char buf[20]; in key_tx_spec_read() local
129 len = scnprintf(buf, sizeof(buf), "\n"); in key_tx_spec_read()
133 len = scnprintf(buf, sizeof(buf), "%08x %04x\n", in key_tx_spec_read()
146 len = scnprintf(buf, sizeof(buf), "%02x%02x%02x%02x%02x%02x\n", in key_tx_spec_read()
153 return simple_read_from_buffer(userbuf, count, ppos, buf, len); in key_tx_spec_read()
161 char buf[14*IEEE80211_NUM_TIDS+1], *p = buf; in key_rx_spec_read() local
168 len = scnprintf(buf, sizeof(buf), "\n"); in key_rx_spec_read()
[all …]
Ddebugfs.c24 char buf[DEBUGFS_FORMAT_BUFFER_SIZE]; in mac80211_format_buffer() local
28 res = vscnprintf(buf, sizeof(buf), fmt, args); in mac80211_format_buffer()
31 return simple_read_from_buffer(userbuf, count, ppos, buf, res); in mac80211_format_buffer()
80 char buf[200]; in aqm_read() local
86 len = scnprintf(buf, sizeof(buf), in aqm_read()
111 buf, len); in aqm_read()
120 char buf[100]; in aqm_write() local
123 if (count > sizeof(buf)) in aqm_write()
126 if (copy_from_user(buf, user_buf, count)) in aqm_write()
129 buf[sizeof(buf) - 1] = '\0'; in aqm_write()
[all …]
Ddebugfs_netdev.c30 char buf[200]; in ieee80211_if_read() local
34 ret = (*format)(sdata, buf, sizeof(buf)); in ieee80211_if_read()
38 ret = simple_read_from_buffer(userbuf, count, ppos, buf, ret); in ieee80211_if_read()
49 char buf[64]; in ieee80211_if_write() local
52 if (count >= sizeof(buf)) in ieee80211_if_write()
55 if (copy_from_user(buf, userbuf, count)) in ieee80211_if_write()
57 buf[count] = '\0'; in ieee80211_if_write()
61 ret = (*write)(sdata, buf, count); in ieee80211_if_write()
69 const struct ieee80211_sub_if_data *sdata, char *buf, \
72 return scnprintf(buf, buflen, format_string, sdata->field); \
[all …]
/net/sunrpc/auth_gss/
Dgss_krb5_wrap.c49 gss_krb5_add_padding(struct xdr_buf *buf, int offset, int blocksize) in gss_krb5_add_padding() argument
51 int padding = gss_krb5_padding(blocksize, buf->len - offset); in gss_krb5_add_padding()
55 if (buf->page_len || buf->tail[0].iov_len) in gss_krb5_add_padding()
56 iov = &buf->tail[0]; in gss_krb5_add_padding()
58 iov = &buf->head[0]; in gss_krb5_add_padding()
61 buf->len += padding; in gss_krb5_add_padding()
66 gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize) in gss_krb5_remove_padding() argument
70 size_t len = buf->len; in gss_krb5_remove_padding()
72 if (len <= buf->head[0].iov_len) { in gss_krb5_remove_padding()
73 pad = *(u8 *)(buf->head[0].iov_base + len - 1); in gss_krb5_remove_padding()
[all …]
Dgss_generic_token.c96 der_write_length(unsigned char **buf, int length) in der_write_length() argument
99 *(*buf)++ = (unsigned char) length; in der_write_length()
101 *(*buf)++ = (unsigned char) (der_length_size(length)+127); in der_write_length()
104 *(*buf)++ = (unsigned char) (length>>24); in der_write_length()
106 *(*buf)++ = (unsigned char) ((length>>16)&0xff); in der_write_length()
109 *(*buf)++ = (unsigned char) ((length>>8)&0xff); in der_write_length()
110 *(*buf)++ = (unsigned char) (length&0xff); in der_write_length()
118 der_read_length(unsigned char **buf, int *bufsize) in der_read_length() argument
125 sf = *(*buf)++; in der_read_length()
134 ret = (ret<<8) + (*(*buf)++); in der_read_length()
[all …]
Dgss_krb5_crypto.c530 gss_encrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf, in gss_encrypt_xdr_buf() argument
537 BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0); in gss_encrypt_xdr_buf()
545 desc.outbuf = buf; in gss_encrypt_xdr_buf()
553 ret = xdr_process_buf(buf, offset, buf->len - offset, encryptor, &desc); in gss_encrypt_xdr_buf()
613 gss_decrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf, in gss_decrypt_xdr_buf() argument
621 BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0); in gss_decrypt_xdr_buf()
633 ret = xdr_process_buf(buf, offset, buf->len - offset, decryptor, &desc); in gss_decrypt_xdr_buf()
656 xdr_extend_head(struct xdr_buf *buf, unsigned int base, unsigned int shiftlen) in xdr_extend_head() argument
666 p = buf->head[0].iov_base + base; in xdr_extend_head()
668 memmove(p + shiftlen, p, buf->head[0].iov_len - base); in xdr_extend_head()
[all …]
/net/tipc/
Dtrace.c53 int tipc_skb_dump(struct sk_buff *skb, bool more, char *buf) in tipc_skb_dump() argument
61 i += scnprintf(buf, sz, "msg: (null)\n"); in tipc_skb_dump()
69 i += scnprintf(buf, sz, "msg: %u", msg_user(hdr)); in tipc_skb_dump()
70 i += scnprintf(buf + i, sz - i, " %u", msg_type(hdr)); in tipc_skb_dump()
71 i += scnprintf(buf + i, sz - i, " %u", msg_hdr_sz(hdr)); in tipc_skb_dump()
72 i += scnprintf(buf + i, sz - i, " %u", msg_data_sz(hdr)); in tipc_skb_dump()
73 i += scnprintf(buf + i, sz - i, " %x", msg_orignode(hdr)); in tipc_skb_dump()
74 i += scnprintf(buf + i, sz - i, " %x", msg_destnode(hdr)); in tipc_skb_dump()
75 i += scnprintf(buf + i, sz - i, " %u", msg_seqno(hdr)); in tipc_skb_dump()
76 i += scnprintf(buf + i, sz - i, " %u", msg_ack(hdr)); in tipc_skb_dump()
[all …]
Dtrace.h129 int tipc_skb_dump(struct sk_buff *skb, bool more, char *buf);
130 int tipc_list_dump(struct sk_buff_head *list, bool more, char *buf);
131 int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf);
132 int tipc_link_dump(struct tipc_link *l, u16 dqueues, char *buf);
133 int tipc_node_dump(struct tipc_node *n, bool more, char *buf);
144 __dynamic_array(char, buf, (more) ? SKB_LMAX : SKB_LMIN)
149 tipc_skb_dump(skb, more, __get_str(buf));
152 TP_printk("%s\n%s", __get_str(header), __get_str(buf))
171 __dynamic_array(char, buf, (more) ? LIST_LMAX : LIST_LMIN)
176 tipc_list_dump(list, more, __get_str(buf));
[all …]
/net/ax25/
Dax25_addr.c46 char *ax2asc(char *buf, const ax25_address *a) in ax2asc() argument
51 for (n = 0, s = buf; n < 6; n++) { in ax2asc()
67 if (*buf == '\0' || *buf == '-') in ax2asc()
70 return buf; in ax2asc()
156 const unsigned char *ax25_addr_parse(const unsigned char *buf, int len, in ax25_addr_parse() argument
167 if (buf[6] & AX25_CBIT) in ax25_addr_parse()
169 if (buf[13] & AX25_CBIT) in ax25_addr_parse()
174 *dama = ~buf[13] & AX25_DAMA_FLAG; in ax25_addr_parse()
178 memcpy(dest, buf + 0, AX25_ADDR_LEN); in ax25_addr_parse()
180 memcpy(src, buf + 7, AX25_ADDR_LEN); in ax25_addr_parse()
[all …]
/net/ieee802154/
Dheader_ops.c15 ieee802154_hdr_push_addr(u8 *buf, const struct ieee802154_addr *addr, in ieee802154_hdr_push_addr() argument
24 memcpy(buf + pos, &addr->pan_id, 2); in ieee802154_hdr_push_addr()
30 memcpy(buf + pos, &addr->short_addr, 2); in ieee802154_hdr_push_addr()
35 memcpy(buf + pos, &addr->extended_addr, IEEE802154_ADDR_LEN); in ieee802154_hdr_push_addr()
47 ieee802154_hdr_push_sechdr(u8 *buf, const struct ieee802154_sechdr *hdr) in ieee802154_hdr_push_sechdr() argument
51 memcpy(buf, hdr, 1); in ieee802154_hdr_push_sechdr()
52 memcpy(buf + 1, &hdr->frame_counter, 4); in ieee802154_hdr_push_sechdr()
62 memcpy(buf + pos, &hdr->short_src, 4); in ieee802154_hdr_push_sechdr()
67 memcpy(buf + pos, &hdr->extended_src, IEEE802154_ADDR_LEN); in ieee802154_hdr_push_sechdr()
72 buf[pos++] = hdr->key_id; in ieee802154_hdr_push_sechdr()
[all …]
/net/core/
Dnet-sysfs.c41 struct device_attribute *attr, char *buf, in netdev_show() argument
49 ret = (*format)(ndev, buf); in netdev_show()
57 static ssize_t format_##field(const struct net_device *dev, char *buf) \
59 return sprintf(buf, format_string, dev->field); \
62 struct device_attribute *attr, char *buf) \
64 return netdev_show(dev, attr, buf, format_##field); \
77 const char *buf, size_t len, in netdev_store() argument
88 ret = kstrtoul(buf, 0, &new); in netdev_store()
114 char *buf) in iflink_show() argument
118 return sprintf(buf, fmt_dec, dev_get_iflink(ndev)); in iflink_show()
[all …]
Dhwbm.c13 void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) in hwbm_buf_free() argument
16 skb_free_frag(buf); in hwbm_buf_free()
18 kfree(buf); in hwbm_buf_free()
26 void *buf; in hwbm_pool_refill() local
29 buf = netdev_alloc_frag(frag_size); in hwbm_pool_refill()
31 buf = kmalloc(frag_size, gfp); in hwbm_pool_refill()
33 if (!buf) in hwbm_pool_refill()
37 if (bm_pool->construct(bm_pool, buf)) { in hwbm_pool_refill()
38 hwbm_buf_free(bm_pool, buf); in hwbm_pool_refill()
/net/sunrpc/xprtrdma/
Dverbs.c81 static void rpcrdma_mrs_destroy(struct rpcrdma_buffer *buf);
407 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; in rpcrdma_ia_remove() local
410 cancel_work_sync(&buf->rb_refresh_worker); in rpcrdma_ia_remove()
433 list_for_each_entry(req, &buf->rb_allreqs, rl_all) { in rpcrdma_ia_remove()
438 rpcrdma_mrs_destroy(buf); in rpcrdma_ia_remove()
803 static void rpcrdma_sendctxs_destroy(struct rpcrdma_buffer *buf) in rpcrdma_sendctxs_destroy() argument
807 for (i = 0; i <= buf->rb_sc_last; i++) in rpcrdma_sendctxs_destroy()
808 kfree(buf->rb_sc_ctxs[i]); in rpcrdma_sendctxs_destroy()
809 kfree(buf->rb_sc_ctxs); in rpcrdma_sendctxs_destroy()
830 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; in rpcrdma_sendctxs_create() local
[all …]
Dtransport.c163 char buf[20]; in xprt_rdma_format_addresses4() local
165 snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr)); in xprt_rdma_format_addresses4()
166 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses4()
175 char buf[40]; in xprt_rdma_format_addresses6() local
177 snprintf(buf, sizeof(buf), "%pi6", &sin6->sin6_addr); in xprt_rdma_format_addresses6()
178 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses6()
186 char buf[128]; in xprt_rdma_format_addresses() local
200 (void)rpc_ntop(sap, buf, sizeof(buf)); in xprt_rdma_format_addresses()
201 xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses()
203 snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); in xprt_rdma_format_addresses()
[all …]
/net/ceph/
Dcrypto.c23 static int set_secret(struct ceph_crypto_key *key, void *buf) in set_secret() argument
43 key->key = kmemdup(buf, key->len, GFP_NOIO); in set_secret()
111 void *buf, *p; in ceph_crypto_key_unarmor() local
115 buf = kmalloc(blen, GFP_NOFS); in ceph_crypto_key_unarmor()
116 if (!buf) in ceph_crypto_key_unarmor()
118 blen = ceph_unarmor(buf, inkey, inkey+inlen); in ceph_crypto_key_unarmor()
120 kfree(buf); in ceph_crypto_key_unarmor()
124 p = buf; in ceph_crypto_key_unarmor()
126 kfree(buf); in ceph_crypto_key_unarmor()
161 const void *buf, unsigned int buf_len) in setup_sgtable() argument
[all …]
Dauth_x.c54 static int ceph_x_encrypt(struct ceph_crypto_key *secret, void *buf, in ceph_x_encrypt() argument
57 struct ceph_x_encrypt_header *hdr = buf + sizeof(u32); in ceph_x_encrypt()
64 ret = ceph_crypt(secret, true, buf + sizeof(u32), buf_len - sizeof(u32), in ceph_x_encrypt()
70 ceph_encode_32(&buf, ciphertext_len); in ceph_x_encrypt()
268 void *buf, void *end) in ceph_x_proc_ticket_reply() argument
270 void *p = buf; in ceph_x_proc_ticket_reply()
307 msg_a = au->buf->vec.iov_base; in encrypt_authorizer()
310 end = au->buf->vec.iov_base + au->buf->vec.iov_len; in encrypt_authorizer()
333 au->buf->vec.iov_len = p - au->buf->vec.iov_base; in encrypt_authorizer()
342 if (au->buf) { in ceph_x_authorizer_cleanup()
[all …]
/net/wireless/
Ddebugfs.c18 char buf[buflen]; \
21 res = scnprintf(buf, buflen, fmt "\n", ##value); \
22 return simple_read_from_buffer(userbuf, count, ppos, buf, res); \
41 char *buf, int buf_size, int offset) in ht_print_chan() argument
47 return scnprintf(buf + offset, in ht_print_chan()
52 return scnprintf(buf + offset, in ht_print_chan()
67 char *buf; in ht40allow_map_read() local
72 buf = kzalloc(buf_size, GFP_KERNEL); in ht40allow_map_read()
73 if (!buf) in ht40allow_map_read()
84 buf, buf_size, offset); in ht40allow_map_read()
[all …]
/net/atm/
Datm_sysfs.c15 struct device_attribute *attr, char *buf) in show_type() argument
19 return scnprintf(buf, PAGE_SIZE, "%s\n", adev->type); in show_type()
23 struct device_attribute *attr, char *buf) in show_address() argument
27 return scnprintf(buf, PAGE_SIZE, "%pM\n", adev->esi); in show_address()
31 struct device_attribute *attr, char *buf) in show_atmaddress() argument
43 count += scnprintf(buf + count, in show_atmaddress()
48 count += scnprintf(buf + count, in show_atmaddress()
52 count += scnprintf(buf + count, PAGE_SIZE - count, "\n"); in show_atmaddress()
60 struct device_attribute *attr, char *buf) in show_atmindex() argument
64 return scnprintf(buf, PAGE_SIZE, "%d\n", adev->number); in show_atmindex()
[all …]
Dresources.c198 void __user *buf; in atm_dev_ioctl() local
215 buf = compat_ptr(cbuf); in atm_dev_ioctl()
220 if (get_user(buf, &iobuf->buffer)) in atm_dev_ioctl()
243 error = ((copy_to_user(buf, tmp_buf, size)) || in atm_dev_ioctl()
260 buf = compat_ptr(carg); in atm_dev_ioctl()
271 if (get_user(buf, &sioc->arg)) in atm_dev_ioctl()
287 if (copy_to_user(buf, dev->type, size)) { in atm_dev_ioctl()
294 if (copy_to_user(buf, dev->esi, size)) { in atm_dev_ioctl()
318 if (copy_from_user(esi, buf, ESI_LEN)) { in atm_dev_ioctl()
334 error = fetch_stats(dev, buf, cmd == ATM_GETSTATZ); in atm_dev_ioctl()
[all …]

12345678