Lines Matching refs:proto

330  * If 'proto' is a valid netid,  and no memory allocations fail, returns a
334 create_rpc_info(const char *proto, int pnum, int low_ver, int high_ver)
352 if ((ret->netid = strdup(proto)) == NULL) {
359 * fails, we check to see whether it was the result of a v6 proto
364 if ((nconf = getnetconfigent(proto)) != NULL) {
368 } else if (!v6_proto(proto)) {
406 create_tlx_info(const char *proto, uu_list_pool_t *conn_ind_pool)
430 if (proto[0] != '/') {
431 sz = strlen("/dev/") + strlen(proto) + 1;
434 (void) snprintf(ret->dev_name, sz, "/dev/%s", proto);
435 } else if ((ret->dev_name = strdup(proto)) == NULL) {
451 v6_proto(const char *proto)
453 return ((strcmp(proto, SOCKET_PROTO_TCP6) == 0) ||
454 (strcmp(proto, SOCKET_PROTO_UDP6) == 0));
462 v6_socket_proto(const char *proto)
464 return ((strcmp(proto, SOCKET_PROTO_SCTP6) == 0) ||
465 v6_proto(proto));
470 valid_socket_proto(const char *proto)
472 return (v6_socket_proto(proto) ||
473 (strcmp(proto, SOCKET_PROTO_SCTP) == 0) ||
474 (strcmp(proto, SOCKET_PROTO_TCP) == 0) ||
475 (strcmp(proto, SOCKET_PROTO_UDP) == 0));
490 free(pi->proto);
584 char *proto = NULL;
673 * proto property and check that they're valid and perform checks on
674 * other fields that are tied-in with the proto.
692 * endpoint type, we can't do any of the proto checks as we
699 /* skip proto specific processing if the proto isn't set. */
707 * Get the next netid/proto.
711 proto = protos[pi++];
717 ((proto = netids[ni++]) == NULL)) {
722 * indexed proto entry.
734 proto = protos[pi - 1];
737 proto = netids[ni++];
740 proto = NULL;
744 if (proto == NULL)
751 only = proto + strlen(proto) - (sizeof ("6only") - 1);
752 if ((only > proto) && (strcmp(only, "6only") == 0)) {
757 /* validate the proto/netid */
760 if (!valid_socket_proto(proto))
768 * flagging 'proto' as invalid. If the latter condition
769 * holds, we don't flag the proto as invalid, and
773 if (((nconf = getnetconfigent(proto)) == NULL) &&
774 !v6_proto(proto))
785 if (strncmp(proto, SOCKET_PROTO_UDP,
800 * any proto structures (they don't do any further validation).
809 if ((ti = create_tlx_info(proto, tlx_ci_pool)) != NULL)
819 if (v6_socket_proto(proto)) {
843 * Store the supplied proto string for error reporting,
846 if ((p_inf->proto = malloc(strlen(proto) + 5)) == NULL) {
850 (void) strlcpy(p_inf->proto, proto, strlen(proto) + 5);
852 (void) strlcat(p_inf->proto, "only",
853 strlen(proto) + 5);
865 if ((ri = create_rpc_info(proto, rpc_pnum,
879 char *gsproto = proto;
884 * proto.
922 /* add new proto entry to proto_list */
932 } while (proto != NULL); /* while just processed a proto */
1668 * Parse the proto list string into an allocated array of proto strings,
1716 * Returns an allocated string array of netids corresponding with 'proto'. The
1717 * function first tries to interpret 'proto' as a nettype to get its netids.
1718 * If this fails it tries to interpret it as a netid. If 'proto' is neither
1720 * returned, else a pointer to an array of netids associated with 'proto' is
1724 get_netids(char *proto)
1732 if (strcmp(proto, "*") == 0)
1733 proto = "visible";
1735 if ((handle = __rpc_setconf(proto)) != NULL) {
1750 if ((netids[0] = strdup(proto)) == NULL) {