Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 206) 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.c32 const char *buf, size_t len, in store_bridge_parm() argument
45 val = simple_strtoul(buf, &endp, 0); in store_bridge_parm()
46 if (endp == buf) in store_bridge_parm()
68 struct device_attribute *attr, char *buf) in forward_delay_show() argument
71 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); in forward_delay_show()
82 const char *buf, size_t len) in forward_delay_store() argument
84 return store_bridge_parm(d, buf, len, set_forward_delay); in forward_delay_store()
89 char *buf) in hello_time_show() argument
91 return sprintf(buf, "%lu\n", in hello_time_show()
102 struct device_attribute *attr, const char *buf, in hello_time_store() argument
[all …]
Dbr_sysfs_if.c48 static ssize_t show_##_name(struct net_bridge_port *p, char *buf) \
50 return sprintf(buf, "%d\n", !!(p->flags & _mask)); \
84 static ssize_t show_path_cost(struct net_bridge_port *p, char *buf) in show_path_cost() argument
86 return sprintf(buf, "%d\n", p->path_cost); in show_path_cost()
92 static ssize_t show_priority(struct net_bridge_port *p, char *buf) in show_priority() argument
94 return sprintf(buf, "%d\n", p->priority); in show_priority()
100 static ssize_t show_designated_root(struct net_bridge_port *p, char *buf) in show_designated_root() argument
102 return br_show_bridge_id(buf, &p->designated_root); in show_designated_root()
106 static ssize_t show_designated_bridge(struct net_bridge_port *p, char *buf) in show_designated_bridge() argument
108 return br_show_bridge_id(buf, &p->designated_bridge); in show_designated_bridge()
[all …]
/net/sunrpc/
Dxdr.c126 void xdr_terminate_string(const struct xdr_buf *buf, const u32 len) in xdr_terminate_string() argument
130 kaddr = kmap_atomic(buf->pages[0]); in xdr_terminate_string()
131 kaddr[buf->page_base + len] = '\0'; in xdr_terminate_string()
136 size_t xdr_buf_pagecount(const struct xdr_buf *buf) in xdr_buf_pagecount() argument
138 if (!buf->page_len) in xdr_buf_pagecount()
140 return (buf->page_base + buf->page_len + PAGE_SIZE - 1) >> PAGE_SHIFT; in xdr_buf_pagecount()
144 xdr_alloc_bvec(struct xdr_buf *buf, gfp_t gfp) in xdr_alloc_bvec() argument
146 size_t i, n = xdr_buf_pagecount(buf); in xdr_alloc_bvec()
148 if (n != 0 && buf->bvec == NULL) { in xdr_alloc_bvec()
149 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.c89 char buf[16 * NUM_WLAN_STA_FLAGS], *pos = buf; in sta_flags_read() local
90 char *end = buf + sizeof(buf) - 1; in sta_flags_read()
102 return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); in sta_flags_read()
111 char buf[17*IEEE80211_NUM_ACS], *p = buf; in sta_num_ps_buf_frames_read() local
115 p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, in sta_num_ps_buf_frames_read()
118 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_num_ps_buf_frames_read()
125 char buf[15*IEEE80211_NUM_TIDS], *p = buf; in sta_last_seq_ctrl_read() local
129 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", in sta_last_seq_ctrl_read()
131 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_last_seq_ctrl_read()
132 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()
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/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.c617 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; in rpcrdma_sendctxs_destroy() local
620 if (!buf->rb_sc_ctxs) in rpcrdma_sendctxs_destroy()
622 for (i = 0; i <= buf->rb_sc_last; i++) in rpcrdma_sendctxs_destroy()
623 kfree(buf->rb_sc_ctxs[i]); in rpcrdma_sendctxs_destroy()
624 kfree(buf->rb_sc_ctxs); in rpcrdma_sendctxs_destroy()
625 buf->rb_sc_ctxs = NULL; in rpcrdma_sendctxs_destroy()
646 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; in rpcrdma_sendctxs_create() local
656 buf->rb_sc_ctxs = kcalloc(i, sizeof(sc), GFP_KERNEL); in rpcrdma_sendctxs_create()
657 if (!buf->rb_sc_ctxs) in rpcrdma_sendctxs_create()
660 buf->rb_sc_last = i - 1; in rpcrdma_sendctxs_create()
[all …]
Dtransport.c164 char buf[20]; in xprt_rdma_format_addresses4() local
166 snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr)); in xprt_rdma_format_addresses4()
167 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses4()
176 char buf[40]; in xprt_rdma_format_addresses6() local
178 snprintf(buf, sizeof(buf), "%pi6", &sin6->sin6_addr); in xprt_rdma_format_addresses6()
179 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses6()
187 char buf[128]; in xprt_rdma_format_addresses() local
201 (void)rpc_ntop(sap, buf, sizeof(buf)); in xprt_rdma_format_addresses()
202 xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses()
204 snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); in xprt_rdma_format_addresses()
[all …]
/net/core/
Dnet-sysfs.c43 struct device_attribute *attr, char *buf, in netdev_show() argument
51 ret = (*format)(ndev, buf); in netdev_show()
59 static ssize_t format_##field(const struct net_device *dev, char *buf) \
61 return sprintf(buf, format_string, dev->field); \
64 struct device_attribute *attr, char *buf) \
66 return netdev_show(dev, attr, buf, format_##field); \
79 const char *buf, size_t len, in netdev_store() argument
90 ret = kstrtoul(buf, 0, &new); in netdev_store()
116 char *buf) in iflink_show() argument
120 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()
112 void *buf, *p; in ceph_crypto_key_unarmor() local
116 buf = kmalloc(blen, GFP_NOFS); in ceph_crypto_key_unarmor()
117 if (!buf) in ceph_crypto_key_unarmor()
119 blen = ceph_unarmor(buf, inkey, inkey+inlen); in ceph_crypto_key_unarmor()
121 kfree(buf); in ceph_crypto_key_unarmor()
125 p = buf; in ceph_crypto_key_unarmor()
127 kfree(buf); in ceph_crypto_key_unarmor()
162 const void *buf, unsigned int buf_len) in setup_sgtable() argument
[all …]
Dauth.c121 int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len) in ceph_auth_build_hello() argument
123 struct ceph_mon_request_header *monhdr = buf; in ceph_auth_build_hello()
124 void *p = monhdr + 1, *end = buf + len, *lenp; in ceph_auth_build_hello()
154 ret = p - buf; in ceph_auth_build_hello()
165 void *buf, int buf_len) in build_request() argument
167 void *end = buf + buf_len; in build_request()
171 p = buf; in build_request()
189 return p + ret - buf; in build_request()
199 void *buf, size_t len, in ceph_handle_auth_reply() argument
202 void *p = buf; in ceph_handle_auth_reply()
[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()
83 buf, buf_size, offset); in ht40allow_map_read()
[all …]
/net/atm/
Datm_sysfs.c15 struct device_attribute *attr, char *buf) in type_show() argument
19 return scnprintf(buf, PAGE_SIZE, "%s\n", adev->type); in type_show()
23 struct device_attribute *attr, char *buf) in address_show() argument
27 return scnprintf(buf, PAGE_SIZE, "%pM\n", adev->esi); in address_show()
31 struct device_attribute *attr, char *buf) in atmaddress_show() argument
40 count += scnprintf(buf + count, PAGE_SIZE - count, in atmaddress_show()
54 struct device_attribute *attr, char *buf) in atmindex_show() argument
58 return scnprintf(buf, PAGE_SIZE, "%d\n", adev->number); in atmindex_show()
62 struct device_attribute *attr, char *buf) in carrier_show() argument
66 return scnprintf(buf, PAGE_SIZE, "%d\n", in carrier_show()
[all …]
/net/bluetooth/
Dhci_debugfs.c38 char buf[3]; \
40 buf[0] = test_bit(__quirk, &hdev->quirks) ? 'Y' : 'N'; \
41 buf[1] = '\n'; \
42 buf[2] = '\0'; \
43 return simple_read_from_buffer(user_buf, count, ppos, buf, 2); \
275 char buf[3]; in use_debug_keys_read() local
277 buf[0] = hci_dev_test_flag(hdev, HCI_USE_DEBUG_KEYS) ? 'Y' : 'N'; in use_debug_keys_read()
278 buf[1] = '\n'; in use_debug_keys_read()
279 buf[2] = '\0'; in use_debug_keys_read()
280 return simple_read_from_buffer(user_buf, count, ppos, buf, 2); in use_debug_keys_read()
[all …]

123456789