Lines Matching defs:port
495 int port;
509 unsigned int progn, port;
512 &port, prog+4) == 4) {
515 c->port = port;
535 /* Even do not try default linux ephemeral port ranges:
541 static int is_ephemeral(int port)
555 return (port >= ip_local_port_min && port<= ip_local_port_max);
559 const char *__resolve_service(int port)
564 if (c->port == port && c->proto == dg_proto)
568 if (!is_ephemeral(port)) {
575 se = getservbyport(htons(port), dg_proto);
584 const char *resolve_service(int port)
589 if (port == 0) {
597 return inet_proto_n2a(port, buf, sizeof(buf));
601 int hash = (port^(((unsigned long)dg_proto)>>2))&255;
604 if (c->port == port &&
612 if ((res = __resolve_service(port)) != NULL) {
620 c->port = port;
634 sprintf(buf, "%u", port);
638 void formatted_print(const inet_prefix *a, int port)
661 printf("%*s:%-*s ", est_len, ap, serv_width, resolve_service(port));
667 int port;
734 if (a->port != -1 && a->port != s->rport)
750 if (a->port != -1 && a->port != s->lport)
764 return s->rport >= a->port;
769 return s->rport <= a->port;
774 return s->lport >= a->port;
779 return s->lport <= a->port;
845 cond->port = a->port;
862 ((struct inet_diag_bc_op*)*bytecode)[1] = (struct inet_diag_bc_op){ 0, 0, x->port };
870 ((struct inet_diag_bc_op*)*bytecode)[1] = (struct inet_diag_bc_op){ 0, 0, x->port };
878 ((struct inet_diag_bc_op*)*bytecode)[1] = (struct inet_diag_bc_op){ 0, 0, x->port };
886 ((struct inet_diag_bc_op*)*bytecode)[1] = (struct inet_diag_bc_op){ 0, 0, x->port };
1013 char *port = NULL;
1019 a.port = -1;
1037 port = strchr(addr, ':');
1038 if (port) {
1039 *port = 0;
1040 if (port[1] && strcmp(port+1, "*")) {
1041 if (get_integer(&a.port, port+1, 0)) {
1042 if ((a.port = xll_name_to_index(port+1)) <= 0)
1062 port = strchr(addr, ':');
1063 if (port) {
1064 *port = 0;
1065 if (port[1] && strcmp(port+1, "*")) {
1066 if (get_integer(&a.port, port+1, 0)) {
1067 if (strcmp(port+1, "kernel") == 0)
1068 a.port = 0;
1101 if ((port = strchr(addr, ']')) == NULL)
1103 *port++ = 0;
1105 port = addr+1;
1107 port = strrchr(strchr(addr, '/') ? : addr, ':');
1109 if (port && *port) {
1110 if (*port != ':')
1112 *port++ = 0;
1113 if (*port && *port != '*') {
1114 if (get_integer(&a.port, port, 0)) {
1118 se1 = getservbyname(port, UDP_PROTO);
1120 se2 = getservbyname(port, TCP_PROTO);
1122 fprintf(stderr, "Error: ambiguous port \"%s\".\n", port);
1128 a.port = ntohs(se1->s_port);
1136 if (s->name && strcmp(s->name, port) == 0) {
1137 if (a.port > 0 && a.port != s->port) {
1138 fprintf(stderr, "Error: ambiguous port \"%s\".\n", port);
1141 a.port = s->port;
1145 if (a.port <= 0) {
1146 fprintf(stderr, "Error: \"%s\" does not look like a port.\n", port);
3026 addr_width, "Local Address", serv_width, "Port",
3027 addr_width, "Peer Address", serv_width, "Port");