MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ip_rsvp_init

Function ip_rsvp_init

freebsd/netinet/ip_input.c:1352–1374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350#define V_ip_rsvp_on VNET(ip_rsvp_on)
1351
1352int
1353ip_rsvp_init(struct socket *so)
1354{
1355
1356 if (so->so_type != SOCK_RAW ||
1357 so->so_proto->pr_protocol != IPPROTO_RSVP)
1358 return EOPNOTSUPP;
1359
1360 if (V_ip_rsvpd != NULL)
1361 return EADDRINUSE;
1362
1363 V_ip_rsvpd = so;
1364 /*
1365 * This may seem silly, but we need to be sure we don't over-increment
1366 * the RSVP counter, in case something slips up.
1367 */
1368 if (!V_ip_rsvp_on) {
1369 V_ip_rsvp_on = 1;
1370 V_rsvp_on++;
1371 }
1372
1373 return 0;
1374}
1375
1376int
1377ip_rsvp_done(void)

Callers 1

rip_ctloutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected