01-20-2006
typecasting can not be done for scalar values----it says
10 More Discussions You Might Find Interesting
1. Programming
Hi
We are using a code generator for initializing structures with the #define macro. Compiling it with the GCC 2.8.1 (with -ansi) it OK. But when we are using the SUN C 5.0 compiler it screams.
Following is a code sample:
#include <stdlib.h>
#include <stdio.h>
typedef struct TEST3 {... (4 Replies)
Discussion started by: amatsaka
4 Replies
2. Programming
I have a struct as follows...
struct A
{
int a;
ucontext_t X; //ucontext_t is another structure
}
How do I define a pointer to the above structure variable X of the type ucontext_t from within another function?
eg. void foo()
{
struct A a;
/////WHAT COMES IN... (1 Reply)
Discussion started by: jacques83
1 Replies
3. Programming
in my .c file i have a struct atop of the program defined as follows:
#define MAX 10
int curtab;
static struct tab {
int count;
int use;
} tab;
with the initial function following it like so:
int tab_create(int init_count)
{
int i;
for(i=0; i < MAX; i++)
{... (1 Reply)
Discussion started by: micmac700
1 Replies
4. UNIX for Advanced & Expert Users
iam trying to built a firewall.so i have used netfilter for it.
in function main_hook sock_buff is returning null and in my log file continuously "sock buff null" is printed plse help to solve this problem..
(using print_string iam printing strings on current terminal (terminal we ping))
... (1 Reply)
Discussion started by: pavan6754
1 Replies
5. UNIX for Dummies Questions & Answers
Can someone tell me how to do this?
Just a thought that entered my mind when learning about structs.
First thought was:
struct one
{
struct two;
}
struct two
{
three;
}
one->two->three
would this be how you would access "three"? (1 Reply)
Discussion started by: unbelievable21
1 Replies
6. Programming
Hi,
I found on linuxgazette.net/93/bhaskaran.html page very useful sample of virtual driver (not connected to real hardware).
I try to compile it with no effect.
So:
I got fresh Ubuntu 9.10 (kernel 2.6.31-14)
My source is saved in networkAdapter.c file in /usr/src/myModules directory.
I... (21 Replies)
Discussion started by: Chrisdot
21 Replies
7. UNIX for Dummies Questions & Answers
what is struct winsize used for?
i tried looking it up, but no luck. (0 Replies)
Discussion started by: l flipboi l
0 Replies
8. Programming
I have the following code and getting the compilation errors
baseLib/DynBaseObj.h:80: error: expected constructor, destructor, or type conversion before ‘(' token
baseLib/DynBaseObj.h:89: error: expected constructor, destructor, or type conversion before ‘(' token
baseLib/DynBaseObj.h:101:... (0 Replies)
Discussion started by: kristinu
0 Replies
9. Programming
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies
10. Programming
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies
LEARN ABOUT SUSE
netsnmp_scalar
scalar(3) net-snmp scalar(3)
NAME
scalar -
Process scalars easily.
Functions
netsnmp_mib_handler * netsnmp_get_scalar_handler (void)
Creates a scalar handler calling netsnmp_create_handler with a handler name defaulted to 'scalar' and access method,
netsnmp_scalar_helper_handler.
int netsnmp_register_scalar (netsnmp_handler_registration *reginfo)
This function registers a scalar helper handler.
int netsnmp_register_read_only_scalar (netsnmp_handler_registration *reginfo)
This function registers a read only scalar helper handler.
int netsnmp_scalar_helper_handler (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
*reqinfo, netsnmp_request_info *requests)
Detailed Description
Process scalars easily.
Function Documentation
netsnmp_mib_handler* netsnmp_get_scalar_handler (void)
Creates a scalar handler calling netsnmp_create_handler with a handler name defaulted to 'scalar' and access method,
netsnmp_scalar_helper_handler. Returns:
Returns a pointer to a netsnmp_mib_handler struct which contains the handler's name and the access method
See also:
netsnmp_get_scalar_handler
netsnmp_register_scalar
Definition at line 47 of file scalar.c.
int netsnmp_register_read_only_scalar (netsnmp_handler_registration * reginfo)
This function registers a read only scalar helper handler. This function is very similar to netsnmp_register_scalar the only addition is
that the 'read_only' handler is injected into the handler chain prior to injecting the serialize handler and registering reginfo.
Parameters:
reginfo a handler registration structure which could get created using netsnmp_create_handler_registration. Used to register a read
only scalar helper handler.
Returns:
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILURE and MIB_DUPLICATE_REGISTRATION.
See also:
netsnmp_register_scalar
netsnmp_get_scalar_handler
Definition at line 110 of file scalar.c.
int netsnmp_register_scalar (netsnmp_handler_registration * reginfo)
This function registers a scalar helper handler. The registered OID, reginfo->rootoid, space is extended for the instance subid using
realloc() but the reginfo->rootoid_len length is not extended just yet. .This function subsequently injects the instance, scalar, and
serialize helper handlers before actually registering reginfo.
Each handler is injected/pushed to the top of the handler chain list and will be processed last in first out, LIFO.
Parameters:
reginfo a handler registration structure which could get created using netsnmp_create_handler_registration. Used to register a scalar
helper handler.
Returns:
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILURE and MIB_DUPLICATE_REGISTRATION.
See also:
netsnmp_register_read_only_scalar
netsnmp_get_scalar_handler
Definition at line 75 of file scalar.c.
Author
Generated automatically by Doxygen for net-snmp from the source code.
Version 5.5 23 Sep 2009 scalar(3)