Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 876) sorted by relevance

12345678910>>...36

/titanic_50/usr/src/cmd/ssh/libssh/common/
H A Dbuffer.c33 buffer_init(Buffer *buffer) in buffer_init() argument
37 buffer->alloc = 0; in buffer_init()
38 buffer->buf = xmalloc(len); in buffer_init()
39 buffer->alloc = len; in buffer_init()
40 buffer->offset = 0; in buffer_init()
41 buffer->end = 0; in buffer_init()
47 buffer_free(Buffer *buffer) in buffer_free() argument
49 if (buffer->alloc > 0) { in buffer_free()
50 memset(buffer->buf, 0, buffer->alloc); in buffer_free()
51 buffer->alloc = 0; in buffer_free()
[all …]
H A Dbufaux.c59 buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value) in buffer_put_bignum_ret() argument
78 buffer_append(buffer, msg, 2); in buffer_put_bignum_ret()
80 buffer_append(buffer, (char *)buf, oi); in buffer_put_bignum_ret()
89 buffer_put_bignum(Buffer *buffer, const BIGNUM *value) in buffer_put_bignum() argument
91 if (buffer_put_bignum_ret(buffer, value) == -1) in buffer_put_bignum()
99 buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value) in buffer_get_bignum_ret() argument
105 if (buffer_get_ret(buffer, (char *) buf, 2) == -1) { in buffer_get_bignum_ret()
116 if (buffer_len(buffer) < bytes) { in buffer_get_bignum_ret()
120 bin = buffer_ptr(buffer); in buffer_get_bignum_ret()
122 if (buffer_consume_ret(buffer, bytes) == -1) { in buffer_get_bignum_ret()
[all …]
H A Dauthfile.c72 Buffer buffer, encrypted; in key_save_private_rsa1() local
89 buffer_init(&buffer); in key_save_private_rsa1()
97 buffer_append(&buffer, buf, 4); in key_save_private_rsa1()
104 buffer_put_bignum(&buffer, key->rsa->d); in key_save_private_rsa1()
105 buffer_put_bignum(&buffer, key->rsa->iqmp); in key_save_private_rsa1()
106 buffer_put_bignum(&buffer, key->rsa->q); /* reverse from SSL p */ in key_save_private_rsa1()
107 buffer_put_bignum(&buffer, key->rsa->p); /* reverse from SSL q */ in key_save_private_rsa1()
110 while (buffer_len(&buffer) % 8 != 0) in key_save_private_rsa1()
111 buffer_put_char(&buffer, 0); in key_save_private_rsa1()
132 cp = buffer_append_space(&encrypted, buffer_len(&buffer)); in key_save_private_rsa1()
[all …]
/titanic_50/usr/src/uts/common/io/ib/mgt/ibmf/
H A Dibmf_saa_utils.c80 static void ibmf_saa_classportinfo_parse_buffer(uchar_t *buffer, void *record);
81 static void ibmf_saa_notice_parse_buffer(uchar_t *buffer, void *record);
82 static void ibmf_saa_informinfo_parse_buffer(uchar_t *buffer, void *record);
83 static void ibmf_saa_node_record_parse_buffer(uchar_t *buffer, void *record);
84 static void ibmf_saa_portinfo_record_parse_buffer(uchar_t *buffer,
86 static void ibmf_saa_SLtoVLmapping_record_parse_buffer(uchar_t *buffer,
88 static void ibmf_saa_switchinfo_record_parse_buffer(uchar_t *buffer,
90 static void ibmf_saa_linearft_record_parse_buffer(uchar_t *buffer,
92 static void ibmf_saa_randomft_record_parse_buffer(uchar_t *buffer,
94 static void ibmf_saa_multicastft_record_parse_buffer(uchar_t *buffer,
[all …]
/titanic_50/usr/src/lib/libadm/common/
H A Dputprmpt.c42 char buffer[1024] = ""; /* NB: code should prevent overflow... */ in putprmpt() local
47 (void) strlcpy(buffer, defstr ? defstr : "No default prompt.", in putprmpt()
48 sizeof (buffer)); in putprmpt()
53 (void) snprintf(buffer, sizeof (buffer), "%s%s", in putprmpt()
56 (void) snprintf(buffer, sizeof (buffer), "%.*s%s", in putprmpt()
59 (void) strlcpy(buffer, prompt, sizeof (buffer)); in putprmpt()
61 (void) strlcpy(buffer, "", sizeof (buffer)); in putprmpt()
63 (void) strlcat(buffer, "\\ [", sizeof (buffer)); in putprmpt()
65 (void) strlcat(buffer, choices[i], sizeof (buffer)); in putprmpt()
66 (void) strlcat(buffer, ",", sizeof (buffer)); in putprmpt()
[all …]
/titanic_50/usr/src/lib/libresolv2/common/irs/
H A Dirpmarshall.c97 static char **splitarray(const char *buffer, const char *buffend, char delim);
98 static int joinarray(char * const * argv, char *buffer, char delim);
99 static char *getfield(char **res, size_t reslen, char **buffer, char delim);
135 irp_marshall_pw(const struct passwd *pw, char **buffer, size_t *len) { in irp_marshall_pw() argument
183 if (buffer == NULL) { in irp_marshall_pw()
188 if (*buffer != NULL && need > *len) { in irp_marshall_pw()
193 if (*buffer == NULL) { in irp_marshall_pw()
195 *buffer = memget(need); in irp_marshall_pw()
196 if (*buffer == NULL) { in irp_marshall_pw()
204 strcpy(*buffer, pw->pw_name); strcat(*buffer, fieldsep); in irp_marshall_pw()
[all …]
/titanic_50/usr/src/lib/udapl/udapl_tavor/common/
H A Ddapl_cookie.c95 DAPL_COOKIE_BUFFER *buffer,
100 DAPL_COOKIE_BUFFER *buffer,
131 IN DAPL_COOKIE_BUFFER *buffer, in dapls_cb_create() argument
151 buffer->pool = dapl_os_alloc(size * sizeof (DAPL_COOKIE)); in dapls_cb_create()
152 if (NULL != buffer->pool) { in dapls_cb_create()
153 buffer->pool_size = size; in dapls_cb_create()
154 buffer->head = 0; in dapls_cb_create()
155 buffer->tail = 0; in dapls_cb_create()
158 buffer->pool[i].index = i; in dapls_cb_create()
159 buffer->pool[i].queue_type = type; in dapls_cb_create()
[all …]
/titanic_50/usr/src/lib/krb5/ss/
H A Dlist_rqs.c48 char buffer[BUFSIZ]; local
97 buffer[0] = '\0';
100 buffer[sizeof(buffer) - 1] = '\0';
103 strncat(buffer, *name, sizeof(buffer) - 1 - strlen(buffer));
106 strncat(buffer, ", ", sizeof(buffer) - 1 - strlen(buffer));
110 strncat(buffer, NL, sizeof(buffer) - 1 - strlen(buffer));
111 fputs(buffer, output);
113 buffer[0] = '\0';
115 strncat(buffer, twentyfive_spaces, strlen(twentyfive_spaces) - spacing);
123 strncat(buffer, entry->info_string, sizeof(buffer) -1 - strlen(buffer));
[all …]
H A Dhelp.c32 char buffer[MAXPATHLEN]; local
50 snprintf(buffer, sizeof (buffer), (char *)dgettext(TEXT_DOMAIN,
53 ss_perror(sci_idx, 0, buffer);
66 (void) strncpy(buffer, info->info_dirs[idx], sizeof(buffer) - 1);
67 buffer[sizeof(buffer) - 1] = '\0';
68 (void) strncat(buffer, "/", sizeof(buffer) - 1 - strlen(buffer));
69 (void) strncat(buffer, argv[1], sizeof(buffer) - 1 - strlen(buffer));
70 (void) strncat(buffer, ".info", sizeof(buffer) - 1 - strlen(buffer));
71 if ((fd = open(&buffer[0], O_RDONLY)) >= 0) goto got_it;
73 if ((fd = open(&buffer[0], O_RDONLY)) < 0) {
/titanic_50/usr/src/cmd/mdb/common/modules/emlxs/
H A Demlxs.c94 char buffer[256]; in emlxs_msgbuf() local
111 mdb_snprintf(buffer, sizeof (buffer), "%s_device", DRIVER_NAME); in emlxs_msgbuf()
112 if (mdb_readvar(&device, buffer) == -1) { in emlxs_msgbuf()
114 "%s not found.\n", buffer); in emlxs_msgbuf()
124 mdb_snprintf(buffer, sizeof (buffer), "%s_instance", DRIVER_NAME); in emlxs_msgbuf()
125 if (mdb_readvar(&instance, buffer) == -1) { in emlxs_msgbuf()
127 buffer); in emlxs_msgbuf()
137 mdb_snprintf(buffer, sizeof (buffer), "%s_instance_count", DRIVER_NAME); in emlxs_msgbuf()
138 if (mdb_readvar(&instance_count, buffer) == -1) { in emlxs_msgbuf()
140 buffer); in emlxs_msgbuf()
[all …]
/titanic_50/usr/src/lib/libc/port/gen/
H A Dgetgrnam.c53 nss_XbyY_buf_t **buffer = arg; in free_grbuf() local
55 NSS_XbyY_FREE(buffer); in free_grbuf()
61 nss_XbyY_buf_t **buffer = in get_grbuf() local
66 if (buffer == NULL) in get_grbuf()
72 if (*buffer) { in get_grbuf()
73 if ((*buffer)->buflen >= blen) /* existing size fits */ in get_grbuf()
74 return (*buffer); in get_grbuf()
75 NSS_XbyY_FREE(buffer); /* existing is too small */ in get_grbuf()
77 b = NSS_XbyY_ALLOC(buffer, sizeof (struct group), blen); in get_grbuf()
90 ret = getgrgid_r(gid, b->result, b->buffer, b->buflen); in getgrgid()
[all …]
H A Dgetpwnam_r.c55 _uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
59 _uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer,
67 getpwnam_r(const char *name, struct passwd *result, char *buffer, int buflen) in getpwnam_r() argument
75 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in getpwnam_r()
87 getpwuid_r(uid_t uid, struct passwd *result, char *buffer, int buflen) in getpwuid_r() argument
91 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in getpwuid_r()
100 _uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, in _uncached_getpwuid_r() argument
105 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in _uncached_getpwuid_r()
118 __posix_getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, in __posix_getpwuid_r() argument
125 if ((*result = getpwuid_r(uid, pwd, buffer, (uintptr_t)bufsize)) in __posix_getpwuid_r()
[all …]
H A Dgetgrnam_r.c62 _uncached_getgrnam_r(const char *name, struct group *result, char *buffer,
66 _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen);
73 getgrnam_r(const char *name, struct group *result, char *buffer, int buflen) in getgrnam_r() argument
81 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); in getgrnam_r()
93 getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen) in getgrgid_r() argument
97 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); in getgrgid_r()
105 _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, in _uncached_getgrgid_r() argument
110 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); in _uncached_getgrgid_r()
122 __posix_getgrgid_r(gid_t gid, struct group *grp, char *buffer, in __posix_getgrgid_r() argument
129 if ((*result = getgrgid_r(gid, grp, buffer, (uintptr_t)bufsize)) in __posix_getgrgid_r()
[all …]
/titanic_50/usr/src/lib/libdns_sd/common/
H A Ddnssd_ipc.c35 static char buffer[1024]; in win32_strerror() local
37 memset(buffer, 0, sizeof(buffer)); in win32_strerror()
43 buffer, in win32_strerror()
44 sizeof(buffer), in win32_strerror()
49 while ((n > 0) && isspace(((unsigned char *) buffer)[n - 1])) in win32_strerror()
50 buffer[--n] = '\0'; in win32_strerror()
52 return buffer; in win32_strerror()
111 int get_string(const char **ptr, const char *const end, char *buffer, int buflen) in get_string() argument
115 *buffer = 0; in get_string()
120 char *lim = buffer + buflen; // Calculate limit in get_string()
[all …]
/titanic_50/usr/src/lib/nsswitch/ldap/common/
H A Dgetprinter.c71 char *buffer = NULL; in _nss_ldap_printers2str() local
84 be->buffer = calloc(1, buflen); in _nss_ldap_printers2str()
85 if (be->buffer == NULL) in _nss_ldap_printers2str()
88 buffer = be->buffer; in _nss_ldap_printers2str()
90 buffer = argp->buf.buffer; in _nss_ldap_printers2str()
91 (void) memset(argp->buf.buffer, 0, buflen); in _nss_ldap_printers2str()
109 len = snprintf(buffer, buflen, "%s", name[0]); in _nss_ldap_printers2str()
110 TEST_AND_ADJUST(len, buffer, buflen, result_printers2str); in _nss_ldap_printers2str()
116 len = snprintf(buffer, buflen, "|%s", in _nss_ldap_printers2str()
118 TEST_AND_ADJUST(len, buffer, buflen, in _nss_ldap_printers2str()
[all …]
H A Dgetprojent.c73 char *buffer, *comment, *attr_str; in _nss_ldap_proj2str() local
84 if ((be->buffer = calloc(1, buflen)) == NULL) { in _nss_ldap_proj2str()
88 buffer = be->buffer; in _nss_ldap_proj2str()
90 buffer = argp->buf.buffer; in _nss_ldap_proj2str()
93 (void) memset(buffer, 0, buflen); in _nss_ldap_proj2str()
110 len = snprintf(buffer, buflen, "%s:%s:%s:", name[0], id[0], in _nss_ldap_proj2str()
112 TEST_AND_ADJUST(len, buffer, buflen, result_proj2str); in _nss_ldap_proj2str()
123 len = snprintf(buffer, buflen, "%s", in _nss_ldap_proj2str()
127 len = snprintf(buffer, buflen, ",%s", in _nss_ldap_proj2str()
130 TEST_AND_ADJUST(len, buffer, buflen, result_proj2str); in _nss_ldap_proj2str()
[all …]
/titanic_50/usr/src/lib/nsswitch/mdns/common/
H A Dmdns_common.c38 static char *RDataToName(char *data, char *buffer, int datalen, int buflen);
121 if (data->buffer == NULL) { in _nss_mdns_queryrecord()
126 stat = (*argp->str2ent)(data->buffer, in _nss_mdns_queryrecord()
127 strlen(data->buffer), in _nss_mdns_queryrecord()
128 argp->buf.result, argp->buf.buffer, in _nss_mdns_queryrecord()
138 free(data->buffer); in _nss_mdns_queryrecord()
140 argp->returnval = argp->buf.buffer; in _nss_mdns_queryrecord()
141 argp->returnlen = strlen(argp->buf.buffer); in _nss_mdns_queryrecord()
143 data->buffer = NULL; in _nss_mdns_queryrecord()
169 char *buffer; in _nss_mdns_querynamereply() local
[all …]
/titanic_50/usr/src/lib/smbsrv/libsmbns/common/
H A Dsmbns_netbios_datagram.c324 char *buffer; in smb_netbios_datagram_send() local
337 if ((buffer = malloc(MAX_DATAGRAM_LENGTH * 4)) == NULL) { in smb_netbios_datagram_send()
342 buffer[0] = DATAGRAM_TYPE_DIRECT_UNIQUE; in smb_netbios_datagram_send()
345 buffer[1] = DATAGRAM_FLAGS_B_NODE | DATAGRAM_FLAGS_FIRST; in smb_netbios_datagram_send()
348 buffer[1] = DATAGRAM_FLAGS_P_NODE | DATAGRAM_FLAGS_FIRST; in smb_netbios_datagram_send()
351 buffer[1] = DATAGRAM_FLAGS_M_NODE | DATAGRAM_FLAGS_FIRST; in smb_netbios_datagram_send()
355 buffer[1] = DATAGRAM_FLAGS_H_NODE | DATAGRAM_FLAGS_FIRST; in smb_netbios_datagram_send()
360 BE_OUT16(&buffer[2], datagram_id); in smb_netbios_datagram_send()
361 (void) memcpy(&buffer[4], &src->addr_list.sin.sin_addr.s_addr, in smb_netbios_datagram_send()
363 (void) memcpy(&buffer[8], &src->addr_list.sin.sin_port, in smb_netbios_datagram_send()
[all …]
/titanic_50/usr/src/cmd/ssh/libopenbsd-compat/common/
H A Dbsd-snprintf.c66 dopr(char *buffer, size_t maxlen, const char *format, va_list args);
69 fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags,
73 fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
77 fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
81 dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
117 dopr(char *buffer, size_t maxlen, const char *format, va_list args) in dopr() argument
141 dopr_outch(buffer, &currlen, maxlen, ch); in dopr()
241 fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags); in dopr()
253 fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags); in dopr()
265 fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); in dopr()
[all …]
/titanic_50/usr/src/lib/libsocket/inet/
H A Dgetprotoent_r.c55 char *buffer, int buflen) in getprotobyname_r() argument
64 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2protoent); in getprotobyname_r()
75 getprotobynumber_r(int proto, struct protoent *result, char *buffer, int buflen) in getprotobynumber_r() argument
80 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2protoent); in getprotobynumber_r()
108 getprotoent_r(struct protoent *result, char *buffer, int buflen) in getprotoent_r() argument
113 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2protoent); in getprotoent_r()
131 char *buffer, int buflen) in str2protoent() argument
139 if ((instr >= buffer && (buffer + buflen) > instr) || in str2protoent()
140 (buffer >= instr && (instr + lenstr) > buffer)) { in str2protoent()
159 (void) memcpy(buffer, namestart, namelen); in str2protoent()
[all …]
H A Dgetnetent_r.c59 char *buffer, int buflen) in getnetbyname_r() argument
68 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2netent); in getnetbyname_r()
80 char *buffer, int buflen) in getnetbyaddr_r() argument
85 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2netent); in getnetbyaddr_r()
114 getnetent_r(struct netent *result, char *buffer, int buflen) in getnetent_r() argument
119 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2netent); in getnetent_r()
135 void *ent /* really (struct netnet *) */, char *buffer, int buflen) in str2netent() argument
143 if ((instr >= buffer && (buffer + buflen) > instr) || in str2netent()
144 (buffer >= instr && (instr + lenstr) > buffer)) { in str2netent()
163 (void) memcpy(buffer, namestart, namelen); in str2netent()
[all …]
/titanic_50/usr/src/lib/libnsl/nss/
H A Dgetrpcent_r.c55 getrpcbyname_r(const char *name, struct rpcent *result, char *buffer, in getrpcbyname_r() argument
65 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2rpcent); in getrpcbyname_r()
75 getrpcbynumber_r(const int number, struct rpcent *result, char *buffer, in getrpcbynumber_r() argument
81 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2rpcent); in getrpcbynumber_r()
106 getrpcent_r(struct rpcent *result, char *buffer, int buflen) in getrpcent_r() argument
111 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2rpcent); in getrpcent_r()
119 str2rpcent(const char *instr, int lenstr, void *ent, char *buffer, int buflen) in str2rpcent() argument
127 if ((instr >= buffer && (buffer + buflen) > instr) || in str2rpcent()
128 (buffer >= instr && (instr + lenstr) > buffer)) in str2rpcent()
145 (void) memcpy(buffer, namestart, namelen); in str2rpcent()
[all …]
/titanic_50/usr/src/lib/libcurses/screen/
H A Dvwprintw.c67 char *buffer; in vwprintw() local
70 buffer = (char *) malloc(size); in vwprintw()
71 if (buffer == NULL) in vwprintw()
75 n = vsnprintf(buffer, size, fmt, ap); in vwprintw()
79 buffer = (char *) realloc(buffer, size); in vwprintw()
80 if (buffer == NULL) in vwprintw()
84 rv = waddstr(win, buffer); in vwprintw()
85 free(buffer); in vwprintw()
/titanic_50/usr/src/lib/libxcurses2/src/libc/xcurses/
H A Dvw_print.c54 char *buffer; in vw_printw() local
57 buffer = (char *)malloc(size); in vw_printw()
58 if (buffer == NULL) in vw_printw()
63 n = vsnprintf(buffer, size, fmt, ap); in vw_printw()
67 buffer = (char *)realloc(buffer, size); in vw_printw()
68 if (buffer == NULL) in vw_printw()
72 rv = waddnstr(w, buffer, -1); in vw_printw()
73 free(buffer); in vw_printw()
H A Dvwprintw.c59 char *buffer; in vwprintw() local
62 buffer = (char *)malloc(size); in vwprintw()
63 if (buffer == NULL) in vwprintw()
68 n = vsnprintf(buffer, size, fmt, ap); in vwprintw()
72 buffer = (char *)realloc(buffer, size); in vwprintw()
73 if (buffer == NULL) in vwprintw()
77 rv = waddnstr(w, buffer, -1); in vwprintw()
78 free(buffer); in vwprintw()

12345678910>>...36