radius.c (138198) | radius.c (140905) |
---|---|
1/* 2 * Copyright 1999 Internet Business Solutions Ltd., Switzerland 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/* 2 * Copyright 1999 Internet Business Solutions Ltd., Switzerland 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/ppp/radius.c 138198 2004-11-29 17:11:15Z brian $ | 26 * $FreeBSD: head/usr.sbin/ppp/radius.c 140905 2005-01-27 14:09:33Z brian $ |
27 * 28 */ 29 30#include <stdint.h> 31#include <sys/param.h> 32 | 27 * 28 */ 29 30#include <stdint.h> 31#include <sys/param.h> 32 |
33#include <sys/select.h> |
|
33#include <sys/socket.h> 34#include <netinet/in_systm.h> 35#include <netinet/in.h> 36#include <netinet/ip.h> 37#include <arpa/inet.h> 38#include <sys/un.h> 39#include <net/route.h> 40 --- 635 unchanged lines hidden (view full) --- 676static void 677radius_Read(struct fdescriptor *d, struct bundle *bundle __unused, 678 const fd_set *fdset __unused) 679{ 680 radius_Continue(descriptor2radius(d), 1); 681} 682 683/* | 34#include <sys/socket.h> 35#include <netinet/in_systm.h> 36#include <netinet/in.h> 37#include <netinet/ip.h> 38#include <arpa/inet.h> 39#include <sys/un.h> 40#include <net/route.h> 41 --- 635 unchanged lines hidden (view full) --- 677static void 678radius_Read(struct fdescriptor *d, struct bundle *bundle __unused, 679 const fd_set *fdset __unused) 680{ 681 radius_Continue(descriptor2radius(d), 1); 682} 683 684/* |
685 * Flush any pending transactions 686 */ 687void 688radius_Flush(struct radius *r) 689{ 690 struct timeval tv; 691 fd_set s; 692 693 while (r->cx.fd != -1) { 694 FD_ZERO(&s); 695 FD_SET(r->cx.fd, &s); 696 tv.tv_sec = 0; 697 tv.tv_usec = TICKUNIT; 698 select(r->cx.fd + 1, &s, NULL, NULL, &tv); 699 radius_Continue(r, 1); 700 } 701} 702 703/* |
|
684 * Behave as a struct fdescriptor (descriptor.h) 685 */ 686static int 687radius_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w __unused, 688 fd_set *e __unused, int *n) 689{ 690 struct radius *rad = descriptor2radius(d); 691 --- 627 unchanged lines hidden --- | 704 * Behave as a struct fdescriptor (descriptor.h) 705 */ 706static int 707radius_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w __unused, 708 fd_set *e __unused, int *n) 709{ 710 struct radius *rad = descriptor2radius(d); 711 --- 627 unchanged lines hidden --- |