Home
last modified time | relevance | path

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

123456789

/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)); \
77 static ssize_t show_path_cost(struct net_bridge_port *p, char *buf) in show_path_cost() argument
79 return sprintf(buf, "%d\n", p->path_cost); in show_path_cost()
85 static ssize_t show_priority(struct net_bridge_port *p, char *buf) in show_priority() argument
87 return sprintf(buf, "%d\n", p->priority); in show_priority()
93 static ssize_t show_designated_root(struct net_bridge_port *p, char *buf) in show_designated_root() argument
95 return br_show_bridge_id(buf, &p->designated_root); in show_designated_root()
99 static ssize_t show_designated_bridge(struct net_bridge_port *p, char *buf) in show_designated_bridge() argument
101 return br_show_bridge_id(buf, &p->designated_bridge); in show_designated_bridge()
[all …]
/net/sunrpc/
Dxdr.c127 xdr_terminate_string(struct xdr_buf *buf, const u32 len) in xdr_terminate_string() argument
131 kaddr = kmap_atomic(buf->pages[0]); in xdr_terminate_string()
132 kaddr[buf->page_base + len] = '\0'; in xdr_terminate_string()
138 xdr_buf_pagecount(struct xdr_buf *buf) in xdr_buf_pagecount() argument
140 if (!buf->page_len) in xdr_buf_pagecount()
142 return (buf->page_base + buf->page_len + PAGE_SIZE - 1) >> PAGE_SHIFT; in xdr_buf_pagecount()
146 xdr_alloc_bvec(struct xdr_buf *buf, gfp_t gfp) in xdr_alloc_bvec() argument
148 size_t i, n = xdr_buf_pagecount(buf); in xdr_alloc_bvec()
150 if (n != 0 && buf->bvec == NULL) { in xdr_alloc_bvec()
151 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.c88 char buf[16 * NUM_WLAN_STA_FLAGS], *pos = buf; in sta_flags_read() local
89 char *end = buf + sizeof(buf) - 1; in sta_flags_read()
101 return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); in sta_flags_read()
110 char buf[17*IEEE80211_NUM_ACS], *p = buf; in sta_num_ps_buf_frames_read() local
114 p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, in sta_num_ps_buf_frames_read()
117 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_num_ps_buf_frames_read()
124 char buf[15*IEEE80211_NUM_TIDS], *p = buf; in sta_last_seq_ctrl_read() local
128 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", in sta_last_seq_ctrl_read()
130 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_last_seq_ctrl_read()
131 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()
82 char buf[200]; in aqm_read() local
88 len = scnprintf(buf, sizeof(buf), in aqm_read()
113 buf, len); in aqm_read()
122 char buf[100]; in aqm_write() local
124 if (count >= sizeof(buf)) in aqm_write()
127 if (copy_from_user(buf, user_buf, count)) in aqm_write()
130 if (count && buf[count - 1] == '\n') in aqm_write()
[all …]
Ddebugfs_netdev.c31 char buf[200]; in ieee80211_if_read() local
35 ret = (*format)(sdata, buf, sizeof(buf)); in ieee80211_if_read()
39 ret = simple_read_from_buffer(userbuf, count, ppos, buf, ret); in ieee80211_if_read()
50 char buf[64]; in ieee80211_if_write() local
53 if (count >= sizeof(buf)) in ieee80211_if_write()
56 if (copy_from_user(buf, userbuf, count)) in ieee80211_if_write()
58 buf[count] = '\0'; in ieee80211_if_write()
62 ret = (*write)(sdata, buf, count); in ieee80211_if_write()
70 const struct ieee80211_sub_if_data *sdata, char *buf, \
73 return scnprintf(buf, buflen, format_string, sdata->field); \
[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/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.c396 gss_encrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf, in gss_encrypt_xdr_buf() argument
403 BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0); in gss_encrypt_xdr_buf()
411 desc.outbuf = buf; in gss_encrypt_xdr_buf()
419 ret = xdr_process_buf(buf, offset, buf->len - offset, encryptor, &desc); in gss_encrypt_xdr_buf()
479 gss_decrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf, in gss_decrypt_xdr_buf() argument
487 BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0); in gss_decrypt_xdr_buf()
499 ret = xdr_process_buf(buf, offset, buf->len - offset, decryptor, &desc); in gss_decrypt_xdr_buf()
522 xdr_extend_head(struct xdr_buf *buf, unsigned int base, unsigned int shiftlen) in xdr_extend_head() argument
532 p = buf->head[0].iov_base + base; in xdr_extend_head()
534 memmove(p + shiftlen, p, buf->head[0].iov_len - base); in xdr_extend_head()
[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/sunrpc/xprtrdma/
Dverbs.c628 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; in rpcrdma_sendctxs_destroy() local
631 if (!buf->rb_sc_ctxs) in rpcrdma_sendctxs_destroy()
633 for (i = 0; i <= buf->rb_sc_last; i++) in rpcrdma_sendctxs_destroy()
634 kfree(buf->rb_sc_ctxs[i]); in rpcrdma_sendctxs_destroy()
635 kfree(buf->rb_sc_ctxs); in rpcrdma_sendctxs_destroy()
636 buf->rb_sc_ctxs = NULL; in rpcrdma_sendctxs_destroy()
654 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; in rpcrdma_sendctxs_create() local
664 buf->rb_sc_ctxs = kcalloc(i, sizeof(sc), GFP_KERNEL); in rpcrdma_sendctxs_create()
665 if (!buf->rb_sc_ctxs) in rpcrdma_sendctxs_create()
668 buf->rb_sc_last = i - 1; in rpcrdma_sendctxs_create()
[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/core/
Dnet-sysfs.c42 struct device_attribute *attr, char *buf, in netdev_show() argument
50 ret = (*format)(ndev, buf); in netdev_show()
58 static ssize_t format_##field(const struct net_device *dev, char *buf) \
60 return sprintf(buf, format_string, dev->field); \
63 struct device_attribute *attr, char *buf) \
65 return netdev_show(dev, attr, buf, format_##field); \
78 const char *buf, size_t len, in netdev_store() argument
89 ret = kstrtoul(buf, 0, &new); in netdev_store()
115 char *buf) in iflink_show() argument
119 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/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
73 buf = kzalloc(buf_size, GFP_KERNEL); in ht40allow_map_read()
74 if (!buf) in ht40allow_map_read()
85 buf, buf_size, offset); in ht40allow_map_read()
[all …]
Dsysfs.c29 char *buf) \
31 return sprintf(buf, fmt "\n", dev_to_rdev(dev)->member); \
41 char *buf) in name_show() argument
45 return sprintf(buf, "%s\n", wiphy_name(wiphy)); in name_show()
51 char *buf) in addresses_show() argument
54 char *start = buf; in addresses_show()
58 return sprintf(buf, "%pM\n", wiphy->perm_addr); in addresses_show()
61 buf += sprintf(buf, "%pM\n", wiphy->addresses[i].addr); in addresses_show()
63 return buf - start; in addresses_show()
/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
40 count += scnprintf(buf + count, PAGE_SIZE - count, in show_atmaddress()
54 struct device_attribute *attr, char *buf) in show_atmindex() argument
58 return scnprintf(buf, PAGE_SIZE, "%d\n", adev->number); in show_atmindex()
62 struct device_attribute *attr, char *buf) in show_carrier() argument
66 return scnprintf(buf, PAGE_SIZE, "%d\n", in show_carrier()
[all …]

123456789