Lines Matching defs: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)
428 if (proto[0] != '/') {
429 sz = strlen("/dev/") + strlen(proto) + 1;
432 (void) snprintf(ret->dev_name, sz, "/dev/%s", proto);
433 } else if ((ret->dev_name = strdup(proto)) == NULL) {
449 v6_proto(const char *proto)
451 return ((strcmp(proto, SOCKET_PROTO_TCP6) == 0) ||
452 (strcmp(proto, SOCKET_PROTO_UDP6) == 0));
460 v6_socket_proto(const char *proto)
462 return ((strcmp(proto, SOCKET_PROTO_SCTP6) == 0) ||
463 v6_proto(proto));
468 valid_socket_proto(const char *proto)
470 return (v6_socket_proto(proto) ||
471 (strcmp(proto, SOCKET_PROTO_SCTP) == 0) ||
472 (strcmp(proto, SOCKET_PROTO_TCP) == 0) ||
473 (strcmp(proto, SOCKET_PROTO_UDP) == 0));
488 free(pi->proto);
582 char *proto = NULL;
671 * proto property and check that they're valid and perform checks on
672 * other fields that are tied-in with the proto.
690 * endpoint type, we can't do any of the proto checks as we
697 /* skip proto specific processing if the proto isn't set. */
705 * Get the next netid/proto.
709 proto = protos[pi++];
715 ((proto = netids[ni++]) == NULL)) {
720 * indexed proto entry.
732 proto = protos[pi - 1];
735 proto = netids[ni++];
738 proto = NULL;
742 if (proto == NULL)
749 only = proto + strlen(proto) - (sizeof ("6only") - 1);
750 if ((only > proto) && (strcmp(only, "6only") == 0)) {
755 /* validate the proto/netid */
758 if (!valid_socket_proto(proto))
766 * flagging 'proto' as invalid. If the latter condition
767 * holds, we don't flag the proto as invalid, and
771 if (((nconf = getnetconfigent(proto)) == NULL) &&
772 !v6_proto(proto))
783 if (strncmp(proto, SOCKET_PROTO_UDP,
798 * any proto structures (they don't do any further validation).
807 if ((ti = create_tlx_info(proto, tlx_ci_pool)) != NULL)
817 if (v6_socket_proto(proto)) {
841 * Store the supplied proto string for error reporting,
844 if ((p_inf->proto = malloc(strlen(proto) + 5)) == NULL) {
848 (void) strlcpy(p_inf->proto, proto, strlen(proto) + 5);
850 (void) strlcat(p_inf->proto, "only",
851 strlen(proto) + 5);
863 if ((ri = create_rpc_info(proto, rpc_pnum,
877 char *gsproto = proto;
882 * proto.
919 /* add new proto entry to proto_list */
929 } while (proto != NULL); /* while just processed a proto */
1665 * Parse the proto list string into an allocated array of proto strings,
1713 * Returns an allocated string array of netids corresponding with 'proto'. The
1714 * function first tries to interpret 'proto' as a nettype to get its netids.
1715 * If this fails it tries to interpret it as a netid. If 'proto' is neither
1717 * returned, else a pointer to an array of netids associated with 'proto' is
1721 get_netids(char *proto)
1729 if (strcmp(proto, "*") == 0)
1730 proto = "visible";
1732 if ((handle = __rpc_setconf(proto)) != NULL) {
1747 if ((netids[0] = strdup(proto)) == NULL) {