Lines Matching refs:port
86 * A UDP port is ready
98 * Create a UDP socket and bind it to the given port
116 addr.sin_port = htons(p->port);
134 p->port);
155 struct udp_port *port;
160 if ((port = malloc(sizeof(*port))) == NULL)
162 memset(port, 0, sizeof(*port));
165 port->tport.index.len = 5;
166 port->tport.index.subs[0] = addr[0];
167 port->tport.index.subs[1] = addr[1];
168 port->tport.index.subs[2] = addr[2];
169 port->tport.index.subs[3] = addr[3];
170 port->tport.index.subs[4] = udp_port;
172 port->addr[0] = addr[0];
173 port->addr[1] = addr[1];
174 port->addr[2] = addr[2];
175 port->addr[3] = addr[3];
176 port->port = udp_port;
178 port->input.fd = -1;
179 port->input.id = NULL;
180 port->input.stream = 0;
181 port->input.cred = 0;
182 port->input.peer = (struct sockaddr *)&port->ret;
183 port->input.peerlen = sizeof(port->ret);
185 trans_insert_port(my_trans, &port->tport);
188 (err = udp_init_port(&port->tport)) != SNMP_ERR_NOERROR) {
189 udp_close_port(&port->tport);
192 *pp = port;
197 * Close an SNMP port
202 struct udp_port *port = (struct udp_port *)tp;
204 snmpd_input_close(&port->input);
206 free(port);
231 u_int32_t port;
261 /* open an SNMP port */
266 if (index_decode(&value->var, sub, iidx, addr, &port))
268 return (udp_open_port(addr, port, &p));
271 /* close SNMP port - do in commit */