| Last change
 on this file since 50 was             2, checked in by Dmitry A. Kuminov, 16 years ago | 
        
          | 
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
 | 
        
          | File size:
            318 bytes | 
      
      
| Line |  | 
|---|
| 1 | /* Sample program for configure to test for if_nametoindex support | 
|---|
| 2 | on target platforms. */ | 
|---|
| 3 |  | 
|---|
| 4 | #if defined(__hpux) | 
|---|
| 5 | #define _HPUX_SOURCE | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | #include <sys/types.h> | 
|---|
| 9 | #include <sys/socket.h> | 
|---|
| 10 | #include <net/if.h> | 
|---|
| 11 |  | 
|---|
| 12 | int main() | 
|---|
| 13 | { | 
|---|
| 14 | char buf[IFNAMSIZ]; | 
|---|
| 15 | if_nametoindex("eth0"); | 
|---|
| 16 | if_indextoname(1, buf); | 
|---|
| 17 | return 0; | 
|---|
| 18 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.