/freebsd/usr.sbin/ppp/ |
H A D | ncp.c | 96 ncp_Init(struct ncp *ncp, struct bundle *bundle) in ncp_Init() argument 98 ncp->afq = AF_INET; in ncp_Init() 99 ncp->route = NULL; in ncp_Init() 101 ncp->cfg.urgent.tcp.port = (u_short *)malloc(NDEFTCPPORTS * sizeof(u_short)); in ncp_Init() 102 if (ncp->cfg.urgent.tcp.port == NULL) { in ncp_Init() 104 ncp->cfg.urgent.tcp.nports = ncp->cfg.urgent.tcp.maxports = 0; in ncp_Init() 106 ncp->cfg.urgent.tcp.nports = ncp->cfg.urgent.tcp.maxports = NDEFTCPPORTS; in ncp_Init() 107 memcpy(ncp->cfg.urgent.tcp.port, default_urgent_tcp_ports, in ncp_Init() 110 ncp->cfg.urgent.tos = 1; in ncp_Init() 112 ncp->cfg.urgent.udp.nports = ncp->cfg.urgent.udp.maxports = 0; in ncp_Init() [all …]
|
H A D | ncp.h | 35 struct ncp { struct 58 extern void ncp_Init(struct ncp *, struct bundle *); argument 59 extern void ncp_Destroy(struct ncp *); 60 extern int ncp_fsmStart(struct ncp *, struct bundle *); 61 extern void ncp_IfaceAddrAdded(struct ncp *, const struct iface_addr *); 62 extern void ncp_IfaceAddrDeleted(struct ncp *, const struct iface_addr *); 63 extern void ncp_SetLink(struct ncp *, struct link *); 64 extern void ncp_Enqueue(struct ncp *, int, unsigned, char *, int); 65 extern void ncp_DeleteQueues(struct ncp *); 66 extern size_t ncp_QueueLen(struct ncp *); [all …]
|
H A D | command.c | 538 oin = bundle->ncp.ipcp.throughput.OctetsIn; in command_Expand() 539 oout = bundle->ncp.ipcp.throughput.OctetsOut; in command_Expand() 540 pin = bundle->ncp.ipcp.throughput.PacketsIn; in command_Expand() 541 pout = bundle->ncp.ipcp.throughput.PacketsOut; in command_Expand() 543 oin += bundle->ncp.ipv6cp.throughput.OctetsIn; in command_Expand() 544 oout += bundle->ncp.ipv6cp.throughput.OctetsOut; in command_Expand() 545 pin += bundle->ncp.ipv6cp.throughput.PacketsIn; in command_Expand() 546 pout += bundle->ncp.ipv6cp.throughput.PacketsOut; in command_Expand() 552 nargv[arg] = substip(nargv[arg], "DNS0", bundle->ncp.ipcp.ns.dns[0]); in command_Expand() 553 nargv[arg] = substip(nargv[arg], "DNS1", bundle->ncp.ipcp.ns.dns[1]); in command_Expand() [all …]
|
H A D | ipcp.c | 222 char *cp, *cp_nons, *ncp, ch; in ipcp_LoadDNS() local 232 while ((ncp = strstr(cp, "nameserver")) != NULL) { in ipcp_LoadDNS() 233 if (ncp != cp) { in ipcp_LoadDNS() 234 memcpy(cp_nons, cp, ncp - cp); in ipcp_LoadDNS() 235 cp_nons += ncp - cp; in ipcp_LoadDNS() 237 if ((ncp != cp && ncp[-1] != '\n') || !issep(ncp[10])) { in ipcp_LoadDNS() 238 memcpy(cp_nons, ncp, 9); in ipcp_LoadDNS() 240 cp = ncp + 9; /* Can't match "nameserver" at cp... */ in ipcp_LoadDNS() 244 for (cp = ncp + 11; issep(*cp); cp++) /* Skip whitespace */ in ipcp_LoadDNS() 247 for (ncp = cp; isip(*ncp); ncp++) /* Jump over IP */ in ipcp_LoadDNS() [all …]
|
H A D | bundle.c | 149 if (ncp_fsmStart(&bundle->ncp, bundle)) { in bundle_NewPhase() 160 mp_Down(&bundle->ncp.mp); in bundle_NewPhase() 219 ncp_DeleteQueues(&bundle->ncp); in bundle_ClearQueues() 254 mp_CheckAutoloadTimer(&bundle->ncp.mp); in bundle_LinksRemoved() 285 mp_CheckAutoloadTimer(&bundle->ncp.mp); in bundle_LayerUp() 287 if (ncp_LayersOpen(&fp->bundle->ncp) == 1) { in bundle_LayerUp() 295 mp_CheckAutoloadTimer(&fp->bundle->ncp.mp); in bundle_LayerUp() 319 if (ncp_LayersOpen(&fp->bundle->ncp) == 0) { in bundle_LayerDown() 326 mp_StopAutoloadTimer(&bundle->ncp.mp); in bundle_LayerDown() 344 if (bundle->ncp.mp.active) { in bundle_LayerDown() [all …]
|
H A D | ncpaddr.c | 409 ncpaddr_aton(struct ncpaddr *addr, struct ncp *ncp, const char *data) in ncpaddr_aton() argument 413 if (!ncprange_aton(&range, ncp, data)) in ncpaddr_aton() 903 ncprange_aton(struct ncprange *range, struct ncp *ncp, const char *data) in ncprange_aton() argument 912 if (ncp && strncasecmp(data, "HISADDR", len) == 0) { in ncprange_aton() 914 range->ncprange_ip4addr = ncp->ipcp.peer_ip; in ncprange_aton() 919 } else if (ncp && strncasecmp(data, "HISADDR6", len) == 0) { in ncprange_aton() 921 range->ncprange_ip6addr = ncp->ipv6cp.hisaddr.ncpaddr_ip6addr; in ncprange_aton() 925 } else if (ncp && strncasecmp(data, "MYADDR", len) == 0) { in ncprange_aton() 927 range->ncprange_ip4addr = ncp->ipcp.my_ip; in ncprange_aton() 932 } else if (ncp && strncasecmp(data, "MYADDR6", len) == 0) { in ncprange_aton() [all …]
|
H A D | vjcomp.c | 78 u_short cproto = bundle->ncp.ipcp.peer_compproto >> 16; in vj_LayerPush() 84 type = sl_compress_tcp(bp, pip, &bundle->ncp.ipcp.vj.cslc, in vj_LayerPush() 85 &bundle->ncp.ipcp.vj.slstat, in vj_LayerPush() 86 bundle->ncp.ipcp.peer_compproto & 0xff); in vj_LayerPush() 184 return VjUncompressTcp(&bundle->ncp.ipcp, bp, type); in vj_LayerPull()
|
H A D | iface.h | 58 extern void iface_Clear(struct iface *, struct ncp *, int, int); 61 extern int iface_Add(struct iface *, struct ncp *, const struct ncprange *, 63 extern int iface_Delete(struct iface *, struct ncp *, const struct ncpaddr *);
|
H A D | ncpaddr.h | 59 struct ncp; 77 extern int ncpaddr_aton(struct ncpaddr *, struct ncp *, const char *); 106 extern int ncprange_aton(struct ncprange *, struct ncp *, const char *);
|
H A D | slcompress.c | 591 arg->bundle->ncp.ipcp.vj.slstat.sls_compressed, in sl_Show() 592 arg->bundle->ncp.ipcp.vj.slstat.sls_packets); in sl_Show() 594 arg->bundle->ncp.ipcp.vj.slstat.sls_misses, in sl_Show() 595 arg->bundle->ncp.ipcp.vj.slstat.sls_searches); in sl_Show() 597 arg->bundle->ncp.ipcp.vj.slstat.sls_compressedin, in sl_Show() 598 arg->bundle->ncp.ipcp.vj.slstat.sls_uncompressedin); in sl_Show() 600 arg->bundle->ncp.ipcp.vj.slstat.sls_errorin, in sl_Show() 601 arg->bundle->ncp.ipcp.vj.slstat.sls_tossed); in sl_Show()
|
H A D | iface.c | 452 iface_Clear(struct iface *iface, struct ncp *ncp, int family, int how) in iface_Clear() argument 490 ncp_IfaceAddrDeleted(ncp, iface->addr + n); in iface_Clear() 509 iface_Add(struct iface *iface, struct ncp *ncp, const struct ncprange *ifa, in iface_Add() argument 536 ncp_IfaceAddrAdded(ncp, iface->addr + n); in iface_Add() 542 ncp_IfaceAddrDeleted(ncp, iface->addr + n); in iface_Add() 556 ncp_IfaceAddrAdded(ncp, iface->addr + n); in iface_Add() 589 ncp_IfaceAddrAdded(ncp, iface->addr + n); in iface_Add() 595 iface_Delete(struct iface *iface, struct ncp *ncp, const struct ncpaddr *del) in iface_Delete() argument 610 ncp_IfaceAddrDeleted(ncp, iface->addr + n); in iface_Delete()
|
H A D | mp.c | 364 ncp_SetLink(&mp->bundle->ncp, &mp->link); in mp_Up() 616 if (!bundle->ncp.mp.active) in mp_Input() 625 mp_Assemble(&bundle->ncp.mp, bp, p); in mp_Input() 668 struct mp *mp = &bundle->ncp.mp; in mp_FillPhysicalQueues() 745 if (!ncp_PushPacket(&bundle->ncp, &mp->out.af, bestlink)) in mp_FillPhysicalQueues() 827 struct mp *mp = &arg->bundle->ncp.mp; in mp_ShowStatus() 959 struct mp *mp = &arg->bundle->ncp.mp; in mp_SetEnddisc() 988 if (arg->bundle->ncp.ipcp.my_ip.s_addr == INADDR_ANY) in mp_SetEnddisc() 989 ncprange_getip4addr(&arg->bundle->ncp.ipcp.cfg.my_range, &addr); in mp_SetEnddisc() 991 addr = arg->bundle->ncp.ipcp.my_ip; in mp_SetEnddisc() [all …]
|
H A D | route.c | 562 if (bundle->ncp.ipcp.ns.dns[0].s_addr == INADDR_NONE) in route_Change() 568 if (bundle->ncp.ipcp.ns.dns[1].s_addr == INADDR_NONE) in route_Change() 762 if (bundle->ncp.cfg.sendpipe > 0) { in rt_Set() 763 rtmes.m_rtm.rtm_rmx.rmx_sendpipe = bundle->ncp.cfg.sendpipe; in rt_Set() 766 if (bundle->ncp.cfg.recvpipe > 0) { in rt_Set() 767 rtmes.m_rtm.rtm_rmx.rmx_recvpipe = bundle->ncp.cfg.recvpipe; in rt_Set() 882 if (bundle->ncp.cfg.sendpipe > 0) { in rt_Update() 883 rtmes.m_rtm.rtm_rmx.rmx_sendpipe = bundle->ncp.cfg.sendpipe; in rt_Update() 887 if (bundle->ncp.cfg.recvpipe > 0) { in rt_Update() 888 rtmes.m_rtm.rtm_rmx.rmx_recvpipe = bundle->ncp.cfg.recvpipe; in rt_Update()
|
H A D | ip.c | 651 if (tos == IPTOS_LOWDELAY && bundle->ncp.cfg.urgent.tos) in PacketCheck() 654 if (!frag && ncp_IsUrgentUdpPort(&bundle->ncp, ntohs(uh->uh_sport), in PacketCheck() 815 if (tos == IPTOS_LOWDELAY && bundle->ncp.cfg.urgent.tos) in PacketCheck() 818 if (!frag && ncp_IsUrgentTcpPort(&bundle->ncp, ntohs(th->th_sport), in PacketCheck() 821 else if (!frag && ncp_IsUrgentTcpLen(&bundle->ncp, datalen)) in PacketCheck() 962 if (bundle->ncp.ipcp.fsm.state != ST_OPENED) { in ipv4_Input() 971 ipcp_AddInOctets(&bundle->ncp.ipcp, nb); in ipv4_Input() 982 if (bundle->ncp.ipv6cp.fsm.state != ST_OPENED) { in ipv6_Input() 991 ipv6cp_AddInOctets(&bundle->ncp.ipv6cp, nb); in ipv6_Input()
|
H A D | ipv6cp.c | 231 if (!iface_Add(bundle->iface, &bundle->ncp, &myrange, &ipv6cp->hisaddr, in ipcp_SetIPv6address() 236 iface_Clear(bundle->iface, &bundle->ncp, AF_INET6, in ipcp_SetIPv6address() 243 if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) { in ipcp_SetIPv6address() 253 route_Change(bundle, bundle->ncp.route, &ipv6cp->myaddr, &ipv6cp->hisaddr); in ipcp_SetIPv6address() 326 struct ipv6cp *ipv6cp = &arg->bundle->ncp.ipv6cp; in ipv6cp_Show() 356 fsm_Input(&bundle->ncp.ipv6cp.fsm, bp); in ipv6cp_Input()
|
/freebsd/lib/libc/rpc/ |
H A D | getnetconfig.c | 106 struct netconfig *ncp; member 240 struct netconfig_vars *ncp = (struct netconfig_vars *)handlep; in getnetconfig() local 250 if (ncp == NULL || nc_file == NULL) { in getnetconfig() 257 switch (ncp->valid) { in getnetconfig() 267 if (ncp->flag == 0) { /* first time */ in getnetconfig() 268 ncp->flag = 1; in getnetconfig() 270 ncp->nc_configs = ni.head; in getnetconfig() 272 if (ncp->nc_configs != NULL) /* entry already exist */ in getnetconfig() 273 return(ncp->nc_configs->ncp); in getnetconfig() 275 else if (ncp->nc_configs != NULL && ncp->nc_configs->next != NULL) { in getnetconfig() [all …]
|
H A D | getnetpath.c | 50 struct netconfig *ncp; /* an nconf entry */ member 143 struct netconfig *ncp = NULL; /* temp. holds a netconfig session */ in getnetpath() local 158 if ((ncp = getnetconfig(np_sessionp->nc_handlep)) == NULL) { in getnetpath() 161 } while ((ncp->nc_flag & NC_VISIBLE) == 0); in getnetpath() 162 return (ncp); in getnetpath() 172 if ((ncp = getnetconfigent(npp)) != NULL) { in getnetpath() 175 chainp->ncp = ncp; in getnetpath() 182 return (ncp); in getnetpath() 210 freenetconfigent(chainp->ncp); in endnetpath()
|
/freebsd/sys/kern/ |
H A D | vfs_cache.c | 453 cache_ncp_invalidate(struct namecache *ncp) in cache_ncp_invalidate() argument 456 KASSERT((ncp->nc_flag & NCF_INVALID) == 0, in cache_ncp_invalidate() 457 ("%s: entry %p already invalid", __func__, ncp)); in cache_ncp_invalidate() 458 atomic_store_char(&ncp->nc_flag, ncp->nc_flag | NCF_INVALID); in cache_ncp_invalidate() 468 #define cache_ncp_canuse(ncp) ({ \ argument 469 struct namecache *_ncp = (ncp); \ 480 #define cache_fpl_neg_ncp_canuse(ncp) ({ \ argument 481 struct namecache *_ncp = (ncp); \ 547 NCP2NEGLIST(struct namecache *ncp) in NCP2NEGLIST() argument 550 return (&neglists[(((uintptr_t)(ncp) >> 8) & ncneghash)]); in NCP2NEGLIST() [all …]
|
/freebsd/cddl/usr.sbin/dwatch/libexec/ |
H A D | vop_readdir | 24 this->ncp = this->vp != NULL ? 60 this->ncp = 0; 65 $PROBE /this->ncp/ /* probe ID $(( $ID + 2 )) (depth 1) */ 68 this->dvp = this->ncp->nc_dvp != NULL ? 69 this->ncp->nc_dvp->v_cache_dst.tqh_first : 0;
|
H A D | vop_create | 24 this->ncp = this->vp != NULL ? 63 this->ncp = 0; 68 $PROBE /this->ncp/ /* probe ID $(( $ID + 2 )) (depth 1) */ 71 this->dvp = this->ncp->nc_dvp != NULL ? 72 this->ncp->nc_dvp->v_cache_dst.tqh_first : 0;
|
H A D | vop_symlink | 24 this->ncp = this->vp != NULL ? 64 this->ncp = 0; 69 $PROBE /this->ncp/ /* probe ID $(( $ID + 2 )) (depth 1) */ 72 this->dvp = this->ncp->nc_dvp != NULL ? 73 this->ncp->nc_dvp->v_cache_dst.tqh_first : 0;
|
/freebsd/contrib/less/ |
H A D | cmdbuf.c | 379 char *ncp; in cmd_right() local 387 ncp = cp; in cmd_right() 388 pr = cmd_step_right(&ncp, &width, NULL); in cmd_right() 393 cp = ncp; in cmd_right() 398 pr = cmd_step_right(&ncp, &width, NULL); in cmd_right() 402 cp = ncp; in cmd_right() 412 char *ncp; in cmd_left() local 421 ncp = cp; in cmd_left() 422 while (ncp > cmdbuf) in cmd_left() 424 cmd_step_left(&ncp, in cmd_left() [all...] |
/freebsd/stand/libsa/ |
H A D | bootp.c | 638 u_char *ncp; in setenv_() local 643 ncp = cp; in setenv_() 648 while (ncp < ep) { in setenv_() 653 tag = *ncp++; /* extract tag and size */ in setenv_() 654 size = *ncp++; in setenv_() 655 cp = ncp; /* current payload */ in setenv_() 656 ncp += size; /* point to the next option */ in setenv_()
|
/freebsd/sbin/ccdconfig/ |
H A D | ccdconfig.c | 366 int ncp; in dumpout() local 371 ncp = 65536; in dumpout() 372 cp = malloc(ncp); in dumpout() 377 gctl_add_param(grq, "output", ncp, cp, in dumpout()
|
/freebsd/crypto/heimdal/appl/telnet/telnetd/ |
H A D | state.c | 1291 #define ADD(c) *ncp++ = c 1292 #define ADD_DATA(c) { *ncp++ = c; if (c == SE || c == IAC) *ncp++ = c; } 1298 unsigned char *ncp; in send_status() local 1301 ncp = statusbuf; in send_status() 1355 writenet(statusbuf, ncp - statusbuf); in send_status() 1359 {printsub('>', statusbuf, ncp - statusbuf); netflush();}); in send_status()
|