• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/router/dhcp6/

Lines Matching refs:ifp

405 	struct dhcp6_if *ifp;
523 if ((ifp = find_ifconfbyname(device)) == NULL) {
528 //ifp->outsock = outsock; // Foxconn removed pling 08/15/2009
550 struct dhcp6_if *ifp = dhcp6_if;
561 //ifp->iaidinfo.iaid = get_iaid(ifp->ifname, &iaidtab[0], num_device);
562 ifp->iaidinfo.iaid = 1; //get_iaid(ifp->ifname, &iaidtab[0], num_device);
564 if (ifp->iaidinfo.iaid == 0) {
567 FNAME, ifp->ifname);
571 FNAME, ifp->ifname, ifp->iaidinfo.iaid);
573 client6_iaidaddr.ifp = ifp;
574 memcpy(&client6_iaidaddr.client6_info.iaidinfo, &ifp->iaidinfo,
579 sprintf(iaidstr, "%u", ifp->iaidinfo.iaid);
616 setup_interface(ifp->ifname);
617 ifp->link_flag |= IFF_RUNNING;
620 (void)get_if_rainfo(ifp);
623 if ((ifp->link_timer =
624 dhcp6_add_timer(check_link_timo, ifp)) < 0) {
628 if ((ifp->sync_timer = dhcp6_add_timer(check_lease_file_timo, ifp)) < 0) {
633 ifp->dad_timer = NULL;
635 if ((ev = dhcp6_create_event(ifp, DHCP6S_INIT)) == NULL) {
640 ifp->servers = NULL;
641 ev->ifp->current_server = NULL;
642 TAILQ_INSERT_TAIL(&ifp->event_list, ev, link);
645 FNAME, ifp->ifname);
652 free_resources(struct dhcp6_if *ifp)
670 for (ev = TAILQ_FIRST(&ifp->event_list); ev; ev = ev_next) {
684 free_servers(ifp);
766 struct dhcp6_if *ifp;
769 ifp = ev->ifp;
783 free_servers(ifp);
813 if ((ifp->send_flags & DHCIFF_INFO_ONLY) ||
817 (!(ifp->ra_flag & IF_RA_MANAGED) &&
818 (ifp->ra_flag & IF_RA_OTHERCONF))*/ )
844 if (ifp->send_flags & DHCIFF_SOLICIT_ONLY) {
852 if (ifp->servers) {
853 ifp->current_server = select_server(ifp);
854 if (ifp->current_server == NULL) {
873 if (ifp->send_flags & DHCIFF_SOLICIT_ONLY) {
875 ifp->send_flags |= DHCIFF_PREFIX_DELEGATION;
877 ifp->send_flags &=~ DHCIFF_PREFIX_DELEGATION;
916 select_server(ifp)
917 struct dhcp6_if *ifp;
921 for (s = ifp->servers; s; s = s->next) {
959 struct dhcp6_if *ifp;
967 ifp = ev->ifp;
977 if (ifp->current_server == NULL) {
984 if (ifp->current_server == NULL) {
991 if (ifp->current_server == NULL) {
1043 dprintf(LOG_DEBUG, "%s" "ifp %p event %p a new XID (%x) is generated",
1044 FNAME, ifp, ev, ev->xid);
1066 if (&ifp->current_server->optinfo == NULL)
1069 duidstr(&ifp->current_server->optinfo.serverID));
1071 &ifp->current_server->optinfo.serverID)) {
1092 strcpy(optinfo.user_class, ifp->user_class);
1102 if (dhcp6_copy_list(&optinfo.reqopt_list, &ifp->reqopt_list)) {
1111 if (ifp->send_flags & DHCIFF_RAPID_COMMIT)
1113 if (!(ifp->send_flags & DHCIFF_INFO_ONLY) ||
1117 if (ifp->send_flags & DHCIFF_PREFIX_DELEGATION)
1119 else if (ifp->send_flags & DHCIFF_TEMP_ADDRS)
1133 if ((ifp->send_flags & DHCIFF_SOLICIT_ONLY) &&
1134 (ifp->send_flags & DHCIFF_PREFIX_DELEGATION)) {
1140 if (!(ifp->send_flags & DHCIFF_INFO_ONLY)) {
1147 memcpy(&optinfo.iaidinfo, &(ifp->current_server->optinfo.iaidinfo),
1149 if (dhcp6_copy_list(&optinfo.addr_list, &(ifp->current_server->optinfo.addr_list)))
1152 &(ifp->current_server->optinfo.prefix_list)))
1156 if (ifp->send_flags & DHCIFF_TEMP_ADDRS)
1158 else if (ifp->send_flags & DHCIFF_PREFIX_DELEGATION)
1224 if (ifp->current_server &&
1225 !IN6_IS_ADDR_UNSPECIFIED(&ifp->current_server->server_addr)) {
1232 error = getaddrinfo(in6addr2str(&ifp->current_server->server_addr,0),
1246 dst.sin6_scope_id = ifp->linkid;
1248 ifp->ifname, addr2str((struct sockaddr *)&dst), ifp->linkid);
1251 //if (sendto(ifp->outsock, buf, len, MSG_DONTROUTE, (struct sockaddr *)&dst,
1273 struct dhcp6_if *ifp;
1281 ifp = ev->ifp;
1304 dprintf(LOG_DEBUG, "%s" "ifp %p event %p a new XID (%x) is generated",
1305 FNAME, ifp, ev, ev->xid);
1329 strcpy(optinfo.user_class, ifp->user_class);
1333 if (dhcp6_copy_list(&optinfo.reqopt_list, &ifp->reqopt_list)) {
1366 if (ifp->current_server &&
1367 !IN6_IS_ADDR_UNSPECIFIED(&ifp->current_server->server_addr)) {
1374 error = getaddrinfo(in6addr2str(&ifp->current_server->server_addr,0),
1388 dst.sin6_scope_id = ifp->linkid;
1390 ifp->ifname, addr2str((struct sockaddr *)&dst), ifp->linkid);
1393 //if (sendto(ifp->outsock, buf, len, MSG_DONTROUTE, (struct sockaddr *)&dst,
1418 struct dhcp6_if *ifp;
1455 if ((ifp = find_ifconfbyid(pi->ipi6_ifindex)) == NULL) {
1461 ifp->ifname, in6addr2str(&pi->ipi6_addr, 0), pi->ipi6_ifindex);
1468 ifp->ifname);
1480 ev = find_event_withid(ifp, ntohl(dh6->dh6_xid) & DH6_XIDMASK);
1486 ev->state, ifp->send_flags) < 0) {
1497 (void)client6_recvadvert(ifp, dh6, len, &optinfo);
1500 (void)client6_recvreply(ifp, dh6, len, &optinfo);
1514 client6_recvadvert(ifp, dh6, len, optinfo0)
1515 struct dhcp6_if *ifp;
1525 ev = find_event_withid(ifp, ntohl(dh6->dh6_xid) & DH6_XIDMASK);
1532 (ifp->send_flags & DHCIFF_RAPID_COMMIT)) {
1571 if (find_server(ifp, &optinfo0->serverID)) {
1579 if (ifp->send_flags & DHCIFF_SOLICIT_ONLY) {
1598 newserver = allocate_newserver(ifp, optinfo0);
1615 ifp->current_server = newserver;
1620 } else if (ifp->servers->next == NULL) {
1635 FNAME, ifp->ifname,
1652 find_server(ifp, duid)
1653 struct dhcp6_if *ifp;
1658 for (s = ifp->servers; s; s = s->next) {
1667 allocate_newserver(ifp, optinfo)
1668 struct dhcp6_if *ifp;
1695 for (sp = &ifp->servers; *sp; sp = &(*sp)->next) {
1707 free_servers(ifp)
1708 struct dhcp6_if *ifp;
1712 for (sp = ifp->servers; sp; sp = sp_next) {
1719 ifp->servers = NULL;
1720 ifp->current_server = NULL;
1726 client6_recvreply(ifp, dh6, len, optinfo)
1727 struct dhcp6_if *ifp;
1740 ev = find_event_withid(ifp, ntohl(dh6->dh6_xid) & DH6_XIDMASK);
1767 newserver = allocate_newserver(ifp, optinfo);
1770 ifp->current_server = newserver;
1772 &ifp->current_server->optinfo.serverID);
1859 dhcp6_clear_list(&(ifp->current_server->optinfo.addr_list));
1860 dhcp6_clear_list(&(ifp->current_server->optinfo.prefix_list));
1865 free_servers(ifp);
1884 (void)get_if_rainfo(ifp);
1896 else if (ifp->dad_timer == NULL && (ifp->dad_timer =
1897 dhcp6_add_timer(check_dad_timo, ifp)) < 0) {
1901 setup_check_timer(ifp);
1958 free_servers(ifp);
1988 if (optinfo->type != IAPD && ifp->dad_timer == NULL &&
1989 (ifp->dad_timer = dhcp6_add_timer(check_dad_timo, ifp)) < 0) {
1993 setup_check_timer(ifp);
2010 free_servers(ifp);
2023 client6_send_newstate(ifp, newstate);
2031 client6_send_newstate(ifp, state)
2032 struct dhcp6_if *ifp;
2036 if ((ev = dhcp6_create_event(ifp, state)) == NULL) {
2043 FNAME, ifp->ifname);
2047 TAILQ_INSERT_TAIL(&ifp->event_list, ev, link);
2071 find_event_withid(ifp, xid)
2072 struct dhcp6_if *ifp;
2077 for (ev = TAILQ_FIRST(&ifp->event_list); ev;
2079 dprintf(LOG_DEBUG, "%s" "ifp %p event %p id is %x",
2080 FNAME, ifp, ev, ev->xid);
2123 static void setup_check_timer(struct dhcp6_if *ifp)
2131 dhcp6_set_timer(&timo, ifp->link_timer);
2132 if (ifp->dad_timer != NULL) {
2137 dhcp6_set_timer(&timo, ifp->dad_timer);
2143 dhcp6_set_timer(&timo, ifp->sync_timer);
2150 struct dhcp6_if *ifp = (struct dhcp6_if *)arg;
2166 dhcp6_set_timer(&timo, ifp->sync_timer);
2167 return ifp->sync_timer;
2173 struct dhcp6_if *ifp = (struct dhcp6_if *)arg;
2188 client6_send_newstate(ifp, newstate);
2191 dhcp6_remove_timer(ifp->dad_timer);
2192 ifp->dad_timer = NULL;
2200 client6_send_newstate(ifp, newstate);
2210 struct dhcp6_if *ifp = (struct dhcp6_if *)arg;
2224 if (ifp->link_flag & IFF_RUNNING) {
2239 client6_send_newstate(ifp, newstate);
2242 ifp->link_flag |= IFF_RUNNING;
2246 ifp->link_flag &= ~IFF_RUNNING;
2252 dhcp6_set_timer(&timo, ifp->link_timer);
2253 return ifp->link_timer;