ALT Linux Bugzilla
– Attachment 1872 Details for
Bug 11201
Segmentation fault when use getifaddrs function
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
prog for test bug
getifaddrs.c (text/plain), 826 bytes, created by
Klimov Denis
on 2007-03-23 19:32:23 MSK
(
hide
)
Description:
prog for test bug
Filename:
MIME Type:
Creator:
Klimov Denis
Created:
2007-03-23 19:32:23 MSK
Size:
826 bytes
patch
obsolete
>/* TEST BUG PROGRAM > * > * Compile > * gcc -o getifaddrs getifaddrs.c > * > * Testing > * with up and down ppp* interfaces run ./getifaddrs > * > * Author: Klimov Denis aka zver > * email: kliden <at> km.ru > * 23/03/2007 > * > * P.S. some problem info about this bug you may read > * http://www.mail-archive.com/debian-glibc@lists.debian.org/msg32785.html > */ > >#include <stdio.h> >#include <stdlib.h> > >#include <sys/types.h> >#include <sys/socket.h> >#include <ifaddrs.h> > >int main() >{ >struct ifaddrs *ifap = NULL; >int rez = getifaddrs(&ifap); >int st=1; >if (rez==0 && ifap!=NULL) > { > do > { > if (st==1) > st=0; > else > ifap=(*ifap).ifa_next; > if (ifap->ifa_addr->sa_family == AF_INET) > { > printf("Interface name: %s \n",(*ifap).ifa_name); > } > } > while ((*ifap).ifa_next!=NULL); > } >return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11201
: 1872