/dragonfly/usr.sbin/ppp/ |
H A D | bundle.c | 115 bundle_PhaseName(struct bundle *bundle) in bundle_PhaseName() argument 198 struct bundle *bundle = (struct bundle *)v; in bundle_ClearQueues() local 279 struct bundle *bundle = (struct bundle *)v; in bundle_LayerUp() local 316 struct bundle *bundle = (struct bundle *)v; in bundle_LayerDown() local 371 struct bundle *bundle = (struct bundle *)v; in bundle_LayerFinish() local 669 bundle_LockTun(struct bundle *bundle) in bundle_LockTun() argument 724 for (bundle.unit = minunit; bundle.unit != maxunit; bundle.unit++) { in bundle_Create() 824 bundle.fsm.object = &bundle; in bundle_Create() 859 ncp_Init(&bundle.ncp, &bundle); in bundle_Create() 1150 struct bundle *bundle = (struct bundle *)v; in bundle_IdleTimeout() local [all …]
|
H A D | bundle.h | 70 struct bundle { struct 156 extern void bundle_Destroy(struct bundle *); 160 extern void bundle_LinksRemoved(struct bundle *); 162 extern void bundle_Down(struct bundle *, int); 171 extern int bundle_IsDead(struct bundle *); 196 extern void bundle_setsid(struct bundle *, int); 197 extern void bundle_LockTun(struct bundle *); 202 extern void bundle_AdjustDNS(struct bundle *); 206 extern void bundle_ChangedPID(struct bundle *); 207 extern void bundle_Notify(struct bundle *, char); [all …]
|
H A D | ipv6cp.c | 198 struct bundle *bundle = ipv6cp->fsm.bundle; in ipcp_SetIPv6address() local 230 if (!iface_Add(bundle->iface, &bundle->ncp, &myrange, &ipv6cp->hisaddr, in ipcp_SetIPv6address() 235 iface_Clear(bundle->iface, &bundle->ncp, AF_INET6, in ipcp_SetIPv6address() 242 if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) { in ipcp_SetIPv6address() 252 route_Change(bundle, bundle->ncp.route, &ipv6cp->myaddr, &ipv6cp->hisaddr); in ipcp_SetIPv6address() 256 route_Change(bundle, bundle->radius.routes, &ipv6cp->myaddr, in ipcp_SetIPv6address() 264 ipv6cp_Init(struct ipv6cp *ipv6cp, struct bundle *bundle, struct link *l, in ipv6cp_Init() argument 350 ipv6cp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in ipv6cp_Input() argument 422 struct bundle *bundle = ipv6cp->fsm.bundle; in ipv6cp_PushPacket() local 486 if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), in ipv6cp_LayerUp() [all …]
|
H A D | ipcp.c | 611 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_proxyarp() local 655 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_SetIPaddress() local 681 iface_Clear(bundle->iface, &bundle->ncp, AF_INET, in ipcp_SetIPaddress() 702 ChooseHisAddr(struct bundle *bundle, struct in_addr gw) in ChooseHisAddr() argument 837 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_IfaceAddrAdded() local 849 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_IfaceAddrDeleted() local 868 radius_Account(&fp->bundle->radius, &fp->bundle->radacct, in IpcpLayerDown() 936 radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, in IpcpLayerUp() 950 if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), in IpcpLayerUp() 966 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_ValidateReq() local [all …]
|
H A D | command.c | 499 struct bundle *bundle, int inc0, pid_t pid) in command_Expand() argument 1055 FindExec(struct bundle *bundle, struct cmdtab const *cmds, int argc, int argn, in FindExec() argument 1087 arg.bundle = bundle; in FindExec() 1159 command_Run(struct bundle *bundle, int argc, char const *const *argv, in command_Run() argument 1195 command_Decode(struct bundle *bundle, char *buff, int nb, struct prompt *prompt, in command_Decode() argument 1652 arg->bundle->cfg.auth.key[sizeof arg->bundle->cfg.auth.key - 1] = '\0'; in SetVariable() 1665 arg->bundle->cfg.auth.name[sizeof arg->bundle->cfg.auth.name-1] = '\0'; in SetVariable() 2728 if (Enabled(arg->bundle, OPT_IFACEALIAS) && !arg->bundle->NatEnabled) { in IfaceAliasOptSet() 3100 return !iface_Add(arg->bundle->iface, &arg->bundle->ncp, &ifa, &peer, how); in IfaceAddCommand() 3124 ok = iface_Delete(arg->bundle->iface, &arg->bundle->ncp, &ifa); in IfaceDeleteCommand() [all …]
|
H A D | pap.c | 85 struct bundle *bundle = authp->physical->dl->bundle; in pap_Req() local 91 namelen = strlen(bundle->cfg.auth.name); in pap_Req() 92 keylen = strlen(bundle->cfg.auth.key); in pap_Req() 96 if (*bundle->cfg.auth.name == '\0') in pap_Req() 108 memcpy(cp, bundle->cfg.auth.key, keylen); in pap_Req() 145 struct bundle *bundle = authp->physical->dl->bundle; in pap_Success() local 149 if (*bundle->radius.cfg.file && bundle->radius.repstr) in pap_Success() 155 if (Enabled(bundle, OPT_UTMP)) in pap_Success() 180 pap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in pap_Input() argument 214 Enabled(bundle, OPT_IDCHECK)) { in pap_Input() [all …]
|
H A D | main.c | 108 static struct bundle *SignalBundle; 307 struct bundle *bundle; in main() local 389 prompt->bundle = bundle; /* couldn't do it earlier */ in main() 393 SignalBundle = bundle; in main() 394 bundle->NatEnabled = sw.nat; in main() 529 DoLoop(bundle); in main() 536 DoLoop(struct bundle *bundle) in DoLoop() argument 559 for (; !bundle_IsDead(bundle); bundle_CleanDatalinks(bundle)) { in DoLoop() 572 if (bundle_IsDead(bundle)) in DoLoop() 655 descriptor_Read(&bundle->desc, bundle, rfds); in DoLoop() [all …]
|
H A D | server.c | 90 server_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset) in server_Read() argument 216 server_Reopen(struct bundle *bundle) in server_Reopen() argument 227 server_Close(bundle); in server_Reopen() 234 server_Close(bundle); in server_Reopen() 243 server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask) in server_LocalOpen() argument 252 server_Close(bundle); in server_LocalOpen() 287 server_Close(bundle); in server_LocalOpen() 310 server_TcpOpen(struct bundle *bundle, u_short port) in server_TcpOpen() argument 361 server_Close(bundle); in server_TcpOpen() 380 server_Close(struct bundle *bundle __unused) in server_Close() [all …]
|
H A D | ncp.c | 95 ncp_Init(struct ncp *ncp, struct bundle *bundle) in ncp_Init() argument 109 mp_Init(&ncp->mp, bundle); in ncp_Init() 112 ipcp_Init(&ncp->ipcp, bundle, &bundle->links->physical->link, in ncp_Init() 113 &bundle->fsm); in ncp_Init() 115 ipv6cp_Init(&ncp->ipv6cp, bundle, &bundle->links->physical->link, in ncp_Init() 116 &bundle->fsm); in ncp_Init() 141 ncp_fsmStart(struct ncp *ncp, struct bundle *bundle) in ncp_fsmStart() argument 146 if (Enabled(bundle, OPT_IPCP)) { in ncp_fsmStart() 301 ncp_FillPhysicalQueues(struct ncp *ncp, struct bundle *bundle) in ncp_FillPhysicalQueues() argument 305 if (bundle->ncp.mp.active) in ncp_FillPhysicalQueues() [all …]
|
H A D | mppe.c | 466 if (*fp->bundle->radius.cfg.file && fp->bundle->radius.mppe.policy) in MPPERequired() 474 MPPE_ConfigVal(struct bundle *bundle __unused, const struct ccp_config *cfg) in MPPE_ConfigVal() 484 if (*bundle->radius.cfg.file && bundle->radius.mppe.types) { in MPPE_ConfigVal() 513 MPPEInitOptsOutput(struct bundle *bundle, struct fsm_opt *o, in MPPEInitOptsOutput() argument 529 mval = MPPE_ConfigVal(bundle, cfg); in MPPEInitOptsOutput() 537 MPPESetOptsOutput(struct bundle *bundle, struct fsm_opt *o, in MPPESetOptsOutput() argument 576 MPPESetOptsInput(struct bundle *bundle, struct fsm_opt *o, in MPPESetOptsInput() argument 680 MPPEInitInput(struct bundle *bundle __unused, struct fsm_opt *o) in MPPEInitInput() 697 if (*bundle->radius.cfg.file && bundle->radius.mppe.recvkey) { in MPPEInitInput() 736 MPPEInitOutput(struct bundle *bundle __unused, struct fsm_opt *o) in MPPEInitOutput() [all …]
|
H A D | auth.c | 168 auth_Select(struct bundle *bundle, const char *name) in auth_Select() argument 176 ipcp_Setup(&bundle->ncp.ipcp, INADDR_NONE); in auth_Select() 181 if (bundle->radius.valid && bundle->radius.ip.s_addr != INADDR_NONE && in auth_Select() 184 if (!ipcp_UseHisIPaddr(bundle, bundle->radius.ip)) in auth_Select() 186 ipcp_Setup(&bundle->ncp.ipcp, bundle->radius.mask.s_addr); in auth_Select() 208 if (!bundle->radius.valid || bundle->radius.ip.s_addr == INADDR_NONE) { in auth_Select() 218 bundle_SetLabel(bundle, vector[3]); in auth_Select() 235 ipcp_Setup(&bundle->ncp.ipcp, INADDR_NONE); in auth_Select() 239 if (bundle->radius.valid) in auth_Select() 249 auth_Validate(struct bundle *bundle, const char *name, const char *key) in auth_Validate() argument [all …]
|
H A D | tcpmss.c | 145 tcpmss_Check(struct bundle *bundle, struct mbuf *bp) in tcpmss_Check() argument 150 if (!Enabled(bundle, OPT_TCPMSSFIXUP)) in tcpmss_Check() 166 MAXMSS(bundle->iface->mtu)); in tcpmss_Check() 172 tcpmss_LayerPush(struct bundle *bundle, struct link *l __unused, struct mbuf *bp, in tcpmss_LayerPush() argument 175 return tcpmss_Check(bundle, bp); in tcpmss_LayerPush() 179 tcpmss_LayerPull(struct bundle *bundle, struct link *l __unused, struct mbuf *bp, in tcpmss_LayerPull() argument 182 return tcpmss_Check(bundle, bp); in tcpmss_LayerPull()
|
H A D | chap.c | 421 chap_Read(struct fdescriptor *d, struct bundle *bundle __unused, in chap_Read() 478 chap_Write(struct fdescriptor *d __unused, struct bundle *bundle __unused, in chap_Write() 551 struct bundle *bundle = authp->physical->dl->bundle; in chap_Success() local 558 if (*bundle->radius.cfg.file && bundle->radius.msrepstr) in chap_Success() 567 if (*bundle->radius.cfg.file && bundle->radius.repstr) in chap_Success() 568 msg = bundle->radius.repstr; in chap_Success() 597 struct bundle *bundle = authp->physical->link.lcp.fsm.bundle; in chap_Failure() local 598 if (*bundle->radius.cfg.file && bundle->radius.errstr) in chap_Failure() 688 chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in chap_Input() argument 832 if (*bundle->cfg.auth.key == '!' && bundle->cfg.auth.key[1] != '!') in chap_Input() [all …]
|
H A D | route.c | 381 route_IfDelete(struct bundle *bundle, int all) in route_IfDelete() argument 473 route_UpdateMTU(struct bundle *bundle) in route_UpdateMTU() argument 545 route_Change(struct bundle *bundle, struct sticky_route *r, in route_Change() argument 731 rt_Set(struct bundle *bundle, int cmd, const struct ncprange *dst, in rt_Set() argument 754 rtmes.m_rtm.rtm_seq = ++bundle->routing_seq; in rt_Set() 759 if (bundle->ncp.cfg.sendpipe > 0) { in rt_Set() 763 if (bundle->ncp.cfg.recvpipe > 0) { in rt_Set() 855 rt_Update(struct bundle *bundle, const struct sockaddr *dst, in rt_Update() argument 873 rtmes.m_rtm.rtm_seq = ++bundle->routing_seq; in rt_Update() 877 if (bundle->ncp.cfg.sendpipe > 0) { in rt_Update() [all …]
|
H A D | route.h | 32 struct bundle; 58 extern void route_IfDelete(struct bundle *, int); 59 extern void route_UpdateMTU(struct bundle *); 61 extern void route_Change(struct bundle *, struct sticky_route *, 67 extern void route_Clean(struct bundle *, struct sticky_route *); 71 extern int rt_Set(struct bundle *, int, const struct ncprange *, 73 extern void rt_Update(struct bundle *, const struct sockaddr *,
|
H A D | tun.c | 85 tun_configure(struct bundle *bundle) in tun_configure() argument 98 sprintf(ifr.ifr_name, "tun%d", bundle->unit); in tun_configure() 99 ifr.ifr_mtu = bundle->iface->mtu; in tun_configure() 110 info.mtu = bundle->iface->mtu; in tun_configure() 112 info.baudrate = bundle->bandwidth; in tun_configure() 116 if (ID0ioctl(bundle->dev.fd, TUNSIFINFO, &info) < 0) in tun_configure()
|
H A D | arp.c | 100 arp_ProxySub(struct bundle *bundle, struct in_addr addr, int add) in arp_ProxySub() argument 124 arpmsg.hdr.rtm_seq = ++bundle->routing_seq; in arp_ProxySub() 148 arp_SetProxy(struct bundle *bundle, struct in_addr addr) in arp_SetProxy() argument 150 return (arp_ProxySub(bundle, addr, 1)); in arp_SetProxy() 157 arp_ClearProxy(struct bundle *bundle, struct in_addr addr) in arp_ClearProxy() argument 159 return (arp_ProxySub(bundle, addr, 0)); in arp_ClearProxy() 168 arp_SetProxy(struct bundle *bundle, struct in_addr addr, int s) in arp_SetProxy() argument 205 arp_ClearProxy(struct bundle *bundle, struct in_addr addr, int s) in arp_ClearProxy() argument
|
H A D | mp.c | 241 mp_Init(struct mp *mp, struct bundle *bundle) in mp_Init() argument 254 mp->bundle = bundle; in mp_Init() 613 mp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in mp_Input() argument 617 if (!bundle->ncp.mp.active) in mp_Input() 633 mp_Output(struct mp *mp, struct bundle *bundle, struct link *l, in mp_Output() argument 667 mp_FillPhysicalQueues(struct bundle *bundle) in mp_FillPhysicalQueues() argument 692 fdl = bundle->links; in mp_FillPhysicalQueues() 701 dl = bundle->links; in mp_FillPhysicalQueues() 791 dl = bundle->links; in mp_FillPhysicalQueues() 1078 mpserver_Read(struct fdescriptor *d, struct bundle *bundle, in mpserver_Read() argument [all …]
|
H A D | server.h | 30 struct bundle; 58 extern enum server_stat server_LocalOpen(struct bundle *, const char *, mode_t); 59 extern enum server_stat server_TcpOpen(struct bundle *, u_short); 60 extern enum server_stat server_Reopen(struct bundle *); 61 extern int server_Close(struct bundle *); 62 extern int server_Clear(struct bundle *);
|
H A D | vjcomp.c | 74 vj_LayerPush(struct bundle *bundle, struct link *l __unused, struct mbuf *bp, int pri __unused, in vj_LayerPush() argument 79 u_short cproto = bundle->ncp.ipcp.peer_compproto >> 16; in vj_LayerPush() 85 type = sl_compress_tcp(bp, pip, &bundle->ncp.ipcp.vj.cslc, in vj_LayerPush() 86 &bundle->ncp.ipcp.vj.slstat, in vj_LayerPush() 87 bundle->ncp.ipcp.peer_compproto & 0xff); in vj_LayerPush() 166 vj_LayerPull(struct bundle *bundle, struct link *l __unused, struct mbuf *bp, in vj_LayerPull() argument 185 return VjUncompressTcp(&bundle->ncp.ipcp, bp, type); in vj_LayerPull()
|
H A D | ip.c | 532 PacketCheck(struct bundle *bundle, u_int32_t family, in PacketCheck() argument 880 ip_Input(struct bundle *bundle, struct link *l, struct mbuf *bp, u_int32_t af) in ip_Input() argument 898 if (PacketCheck(bundle, af, tun.data, nb, &bundle->filter.in, in ip_Input() 906 bundle_StartIdleTimer(bundle, secs); in ip_Input() 909 if (bundle->dev.header) { in ip_Input() 916 nw = write(bundle->dev.fd, data, nb); in ip_Input() 929 ipv4_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in ipv4_Input() argument 941 nb = ip_Input(bundle, l, bp, AF_INET); in ipv4_Input() 942 ipcp_AddInOctets(&bundle->ncp.ipcp, nb); in ipv4_Input() 949 ipv6_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in ipv6_Input() argument [all …]
|
H A D | command.h | 33 struct bundle; 43 struct bundle *bundle; /* Our bundle */ member 65 extern void command_Expand(char **, int, char const *const *, struct bundle *, 70 extern void command_Run(struct bundle *, int, char const *const *, 72 extern int command_Decode(struct bundle *, char *, int, struct prompt *,
|
H A D | datalink.c | 160 if (!dl->bundle->CleaningUp && in datalink_HangupDone() 261 !dl->bundle->CleaningUp) in datalink_UpdateSet() 447 datalink_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset) in datalink_Read() argument 477 datalink_Write(struct fdescriptor *d, struct bundle *bundle, in datalink_Write() argument 791 datalink_Create(const char *name, struct bundle *bundle, int type) in datalink_Create() argument 821 dl->bundle = bundle; in datalink_Create() 844 dl->parent = &bundle->fsm; in datalink_Create() 893 dl->bundle = odl->bundle; in datalink_Clone() 1290 iov2datalink(struct bundle *bundle, struct iovec *iov, int *niov, int maxiov, in iov2datalink() argument 1340 dl->bundle = bundle; in iov2datalink() [all …]
|
H A D | ip.h | 35 struct bundle; 37 extern int ip_PushPacket(struct link *, struct bundle *); 38 extern int PacketCheck(struct bundle *, u_int32_t, const unsigned char *, int, 42 extern struct mbuf *ipv4_Input(struct bundle *, struct link *, struct mbuf *); 44 extern struct mbuf *ipv6_Input(struct bundle *, struct link *, struct mbuf *);
|
H A D | ccp.h | 131 int (*Set)(struct bundle *, struct fsm_opt *, const struct ccp_config *); 132 void *(*Init)(struct bundle *, struct fsm_opt *); 140 void (*OptInit)(struct bundle *, struct fsm_opt *, 142 int (*Set)(struct bundle *, struct fsm_opt *, const struct ccp_config *); 143 void *(*Init)(struct bundle *, struct fsm_opt *); 151 extern void ccp_Init(struct ccp *, struct bundle *, struct link *, 158 extern struct mbuf *ccp_Input(struct bundle *, struct link *, struct mbuf *);
|