|
| Error when use netware_net_info |
 |
Thu, 21 Jun 2007 08:04:49 GMT |
Hi,
I create a simple application which call the function netware_net_info, but
it reports an error "segmentation fault" after print
"test01"
here's my code:
struct net_info StruNetInfo;
void main( int argc)
{
printf( "Test Net Info from Netware ---------Start\n");
printf( "test00\n");
memset( (char *)&StruNetInfo, 0x00, sizeof( StruNetInfo ) );
printf( "test01\n");
if( !netware_net_info(&StruNetInfo) )
{
printf( "test02\n");
printf( "netinfo.MaximumConnections=[%d]\n",
StruNetInfo.MaximumConnections );
printf( "netinfo.MaximumBoards=[%d]\n", StruNetInfo.MaximumBoards
);
}
printf( "Test Net Info from Netware ---------END");
|
| Post Reply
|
| Re: Error when use netware_net_info |
 |
Thu, 21 Jun 2007 14:14:48 GMT |
Hi,
can confirm that there's a problem; tested with CodeWarrior and gcc, and got
with both the abend.
Günter.
yushuang@cn.ibm.com wrote in news:Biqei.278$on5.38@prv-
forum2.provo.novell.com:
> Hi,
> I create a simple application which call the function netware_net_info,
but
> it reports an error "segmentation fault" after print
"test01"
> here's my code:
>
> struct net_info StruNetInfo;
>
> void main( int argc)
> {
> printf( "Test Net Info from Netware ---------Start\n");
> printf( "test00\n");
> memset( (char *)&StruNetInfo, 0x00, sizeof( StruNetInfo ) );
> printf( "test01\n");
> if( !netware_net_info(&StruNetInfo) )
> {
> printf( "test02\n");
> printf( "netinfo.MaximumConnections=[%d]\n",
> StruNetInfo.MaximumConnections );
> printf( "netinfo.MaximumBoards=[%d]\n",
StruNetInfo.MaximumBoards );
> }
> printf( "Test Net Info from Netware ---------END");
> }
>
|
| Post Reply
|
| Re: Error when use netware_net_info |
 |
Fri, 22 Jun 2007 01:37:02 GMT |
Thanks, Günter.
Do we have some workaround in libc to get network info? now we are trying
to do some monitoring job on Netware OS, and net infomation, like address,
is very necessary for us.
> Hi,
> can confirm that there's a problem; tested with CodeWarrior and gcc, and
got
> with both the abend.
>
> Günter.
>
> yushuang@cn.ibm.com wrote in news:Biqei.278$on5.38@prv-
> forum2.provo.novell.com:
>
> > Hi,
> > I create a simple application which call the function
netware_net_info, but
> > it reports an error "segmentation fault" after print
"test01"
> > here's my code:
> >
> > struct net_info StruNetInfo;
> >
> > void main( int argc)
> > {
> > printf( "Test Net Info from Netware ---------Start\n");
> > printf( "test00\n");
> > memset( (char *)&StruNetInfo, 0x00, sizeof( StruNetInfo ) );
> > printf( "test01\n");
> > if( !netware_net_info(&StruNetInfo) )
> > {
> > printf( "test02\n");
> > printf( "netinfo.MaximumConnections=[%d]\n",
> > StruNetInfo.MaximumConnections );
> > printf( "netinfo.MaximumBoards=[%d]\n",
StruNetInfo.MaximumBoards );
> > }
> > printf( "Test Net Info from Netware ---------END");
> > }
> >
>
|
| Post Reply
|
| Re: Error when use netware_net_info |
 |
Fri, 22 Jun 2007 03:05:20 GMT |
yushuang@cn.ibm.com wrote:
> Thanks, Günter.
> Do we have some workaround in libc to get network info? now we are trying
> to do some monitoring job on Netware OS, and net infomation, like address,
> is very necessary for us.
>
>> Hi,
>> can confirm that there's a problem; tested with CodeWarrior and gcc,
and got
>> with both the abend.
>>
>> Günter.
>>
>> yushuang@cn.ibm.com wrote in news:Biqei.278$on5.38@prv-
>> forum2.provo.novell.com:
>>
>>> Hi,
>>> I create a simple application which call the function
netware_net_info, but
>>> it reports an error "segmentation fault" after print
"test01"
>>> here's my code:
>>>
>>> struct net_info StruNetInfo;
>>>
>>> void main( int argc)
>>> {
>>> printf( "Test Net Info from Netware ---------Start\n");
>>> printf( "test00\n");
>>> memset( (char *)&StruNetInfo, 0x00, sizeof( StruNetInfo ) );
>>> printf( "test01\n");
>>> if( !netware_net_info(&StruNetInfo) )
>>> {
>>> printf( "test02\n");
>>> printf( "netinfo.MaximumConnections=[%d]\n",
>>> StruNetInfo.MaximumConnections );
>>> printf( "netinfo.MaximumBoards=[%d]\n",
StruNetInfo.MaximumBoards );
>>> }
>>> printf( "Test Net Info from Netware ---------END");
>>> }
>>>
>
Those netware_- functions (from monitor.h) are pretty small. Step down
inside and see what it's doing. For one thing, they initialize the
in-coming pointer in the first place--you don't need to do it.
Second, they used lots of strange functions that weren't always certain
to exist, but when not present, they first attempted to import pointers
to them, but should not attempt to call through a null pointer if unable
to find them. You could report a problem to Jeff and he could fix it.
|
| Post Reply
|
| Re: Error when use netware_net_info |
 |
Fri, 22 Jun 2007 10:53:44 GMT |
Hi,
Russell Bateman <russ@windofkeltia.com> wrote in
news:Q%Gei.269$Rg7.22@prv-forum2.provo.novell.com:
> Those netware_- functions (from monitor.h) are pretty small. Step down
> inside and see what it's doing. For one thing, they initialize the
> in-coming pointer in the first place--you don't need to do it.
did strip that already, but that didnt fix the abend.
> Second, they used lots of strange functions that weren't always certain
> to exist, but when not present, they first attempted to import pointers
> to them, but should not attempt to call through a null pointer if unable
> to find them. You could report a problem to Jeff and he could fix it.
did already send this sample to Jeff before I answered here.
Gün.
|
| Post Reply
|
|
|