1*5e7646d2SAndroid Build Coastguard Worker /* 2*5e7646d2SAndroid Build Coastguard Worker * Network interface definitions for the CUPS scheduler. 3*5e7646d2SAndroid Build Coastguard Worker * 4*5e7646d2SAndroid Build Coastguard Worker * Copyright © 2007-2010 by Apple Inc. 5*5e7646d2SAndroid Build Coastguard Worker * Copyright © 1997-2006 by Easy Software Products, all rights reserved. 6*5e7646d2SAndroid Build Coastguard Worker * 7*5e7646d2SAndroid Build Coastguard Worker * Licensed under Apache License v2.0. See the file "LICENSE" for more 8*5e7646d2SAndroid Build Coastguard Worker * information. 9*5e7646d2SAndroid Build Coastguard Worker */ 10*5e7646d2SAndroid Build Coastguard Worker 11*5e7646d2SAndroid Build Coastguard Worker /* 12*5e7646d2SAndroid Build Coastguard Worker * Structures... 13*5e7646d2SAndroid Build Coastguard Worker */ 14*5e7646d2SAndroid Build Coastguard Worker 15*5e7646d2SAndroid Build Coastguard Worker typedef struct cupsd_netif_s /**** Network interface data ****/ 16*5e7646d2SAndroid Build Coastguard Worker { 17*5e7646d2SAndroid Build Coastguard Worker int is_local, /* Local (not point-to-point) interface? */ 18*5e7646d2SAndroid Build Coastguard Worker port; /* Listen port */ 19*5e7646d2SAndroid Build Coastguard Worker http_addr_t address, /* Network address */ 20*5e7646d2SAndroid Build Coastguard Worker mask, /* Network mask */ 21*5e7646d2SAndroid Build Coastguard Worker broadcast; /* Broadcast address */ 22*5e7646d2SAndroid Build Coastguard Worker size_t hostlen; /* Length of hostname */ 23*5e7646d2SAndroid Build Coastguard Worker char name[32], /* Network interface name */ 24*5e7646d2SAndroid Build Coastguard Worker hostname[1]; /* Hostname associated with interface */ 25*5e7646d2SAndroid Build Coastguard Worker } cupsd_netif_t; 26*5e7646d2SAndroid Build Coastguard Worker 27*5e7646d2SAndroid Build Coastguard Worker 28*5e7646d2SAndroid Build Coastguard Worker /* 29*5e7646d2SAndroid Build Coastguard Worker * Globals... 30*5e7646d2SAndroid Build Coastguard Worker */ 31*5e7646d2SAndroid Build Coastguard Worker 32*5e7646d2SAndroid Build Coastguard Worker VAR int NetIFUpdate VALUE(1); 33*5e7646d2SAndroid Build Coastguard Worker /* Network interface list needs updating */ 34*5e7646d2SAndroid Build Coastguard Worker VAR cups_array_t *NetIFList VALUE(NULL); 35*5e7646d2SAndroid Build Coastguard Worker /* Array of network interfaces */ 36*5e7646d2SAndroid Build Coastguard Worker 37*5e7646d2SAndroid Build Coastguard Worker /* 38*5e7646d2SAndroid Build Coastguard Worker * Prototypes... 39*5e7646d2SAndroid Build Coastguard Worker */ 40*5e7646d2SAndroid Build Coastguard Worker 41*5e7646d2SAndroid Build Coastguard Worker extern cupsd_netif_t *cupsdNetIFFind(const char *name); 42*5e7646d2SAndroid Build Coastguard Worker extern void cupsdNetIFUpdate(void); 43