Sponsored Content
Top Forums Programming structure pointer array as function parameters Post 302532660 by shamrock on Tuesday 21st of June 2011 04:10:18 PM
Old 06-21-2011
Quote:
Originally Posted by mscoder
the programme goes into an infinite loop whenever i try to display the list pointed by add_result..the functions add() and display() work fine in other cases..
Can you post this piece of code...seems like the condition for stopping the display pointed by add_result may not be right.
 

10 More Discussions You Might Find Interesting

1. Programming

Problem with function which reutrns pointer to a value

i have a function: char *pcCityIdToCountryName(ADMIN_DB_DATA *pstHEader, unit uiCityID) this returns a pointer to CountryName if cityId is given. to retrieve countryname i give: char *CountryName; CountryName = pcCityIdToCountryName(..................); but when i compile it is giving :... (5 Replies)
Discussion started by: jazz
5 Replies

2. Programming

Accesing structure member:Error:dereferencing pointer to incomplete type

$ gcc -Wall -Werror struct.c struct.c: In function `main': struct.c:18: error: dereferencing pointer to incomplete type $ cat struct.c #include <stdio.h> #include <stdlib.h> #include <string.h> /*Declaration of structure*/ struct human { char *first; char gender; int age; } man,... (3 Replies)
Discussion started by: amit4g
3 Replies

3. UNIX for Dummies Questions & Answers

Storing pointer array in C

All .. I am having a pointer array . And trying to store the addess into that pointer array . please see below the problem i faced code: int cnt1; char *t_array; char *f_array; for(cnt1=0; cnt1<1000; cnt1++) { t_array =... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

4. Programming

pointer to structure example pls

Dear friends, First all I applogize for posting such a simple question , as I love this forum and forum participants thats why I am posting my problem here.. Why I am getting error when I remove the commented lines typedef unsigned int U; typedef struct {U c; U d;} vec32; ... (1 Reply)
Discussion started by: user_prady
1 Replies

5. Programming

How to return void function pointer

Hello all im trying to build function that will return void function pointer what is mean is ( not working ) the main function void * myClass::getFunction(int type){ if(type==1) return &myClass::Test1; if(type==2) return &myClass::Test2; } void myClass::Test1(){... (1 Reply)
Discussion started by: umen
1 Replies

6. Programming

Function pointer to inline function ?

Hi. Problem: I have to parse the payload of a packet. The payload could be in Big Endian Format (network byte order) or little. That depends on a flag present in the header of the packet. Solution: A horrible solution could be to check for that flag everytime I have to read a field in the... (11 Replies)
Discussion started by: emitrax
11 Replies

7. Programming

Function Returning Pointer

Hi guys. how a functions such fdopen, ... can return pointer? are these functions use static memory(variables)? (6 Replies)
Discussion started by: majid.merkava
6 Replies

8. Programming

help with char pointer array in C

i have an array like #define NUM 8 .... new_socket_fd = accept(socket_fd, (struct sockaddr *) &cli_addr, &client_length); char *items = {"one", "two", "three", "four", "five", "six", "seven", "eight"}; char *item_name_length = {"3", "3", "5", "4", "4", "3", "5", "5"}; ... (1 Reply)
Discussion started by: omega666
1 Replies

9. Programming

Unclear pointer and array

Hello, The purpose of the program is to print a sub string from the prompt inputs. I do not understand why char pointer does not work but char array will for line 40 and Line 41. ./a.out thisisatest 0 8 substring = "thisisat"And my code is: #include <stdio.h> #include <stdlib.h> #include... (29 Replies)
Discussion started by: yifangt
29 Replies

10. Programming

Pointer for 2D array seems to be 3D in C

I am struggling with the pointer to 2D-array (cf: 2D array of pointers). Can anybody help me elaborate how the pointer x moves in the memory to access the individual of y, especially the high lighted lines? I have talked to one of the curators of the forum, but I am still not quite clear. Here... (1 Reply)
Discussion started by: yifangt
1 Replies
IEEE80211_NODE(9)					   BSD Kernel Developer's Manual					 IEEE80211_NODE(9)

NAME
ieee80211_node_attach, ieee80211_node_lateattach, ieee80211_node_detach, ieee80211_begin_scan, ieee80211_next_scan, ieee80211_end_scan, ieee80211_create_ibss, ieee80211_alloc_node, ieee80211_dup_bss, ieee80211_find_node, ieee80211_free_node, ieee80211_free_allnodes, ieee80211_iterate_nodes -- software 802.11 stack node management functions SYNOPSIS
#include <net80211/ieee80211_var.h> #include <net80211/ieee80211_proto.h> #include <net80211/ieee80211_node.h> void ieee80211_node_attach(struct ieee80211com *ic); void ieee80211_node_lateattach(struct ieee80211com *ic); void ieee80211_node_detach(struct ieee80211com *ic); void ieee80211_begin_scan(struct ieee80211com *ic, int reset); void ieee80211_next_scan(struct ieee80211com *ic); void ieee80211_end_scan(struct ieee80211com *ic); void ieee80211_create_ibss(struct ieee80211com *ic, struct ieee80211_channel *chan); struct ieee80211_node * ieee80211_alloc_node(struct ieee80211com *ic, u_int8_t *macaddr); struct ieee80211_node * ieee80211_dup_bss(struct ieee80211_node_table *nt, const u_int8_t *macaddr); struct ieee80211_node * ieee80211_find_node(struct ieee80211_node_table *nt, const u_int8_t *macaddr); void ieee80211_free_node(struct ieee80211_node *ni); void ieee80211_free_allnodes(struct ieee80211_node_table *nt); void ieee80211_iterate_nodes(struct ieee80211_node_table *nt, ieee80211_iter_func *f, void *arg); DESCRIPTION
These functions are used to manage node lists within the software 802.11 stack. These lists are typically used for implementing host-mode AP functionality, or providing signal quality information about neighbouring nodes. The ieee80211_node_attach() function is called from ieee80211_ifattach(9) to initialize node database management callbacks for the interface ic (specifically for memory allocation, node copying and node signal inspection). These functions may be overridden in special circum- stances, as long as this is done after calling ieee80211_ifattach(9) and prior to any other call which may allocate a node. The ieee80211_node_lateattach() function initialises the ic_bss node element of the interface ic during ieee80211_media_init(9). This late attachment is to account for certain special cases described under ieee80211_node_attach(). The ieee80211_node_detach() function destroys all node database state associated with the interface ic, and is usually called during device detach. The ieee80211_begin_scan() function initialises the node database in preparation of a scan for an access point on the interface ic and begins the scan. The parameter reset controls if a previously built node list should be cleared. The actual scanning for an access point is not fully automated: the device driver itself controls stepping through the channels, usually by a periodical callback. The ieee80211_next_scan() function is used to inform the ieee80211(9) layer that the next channel for interface ic should be scanned. The ieee80211_create_ibss() function sets up the net80211-specific portion of an interface's softc, ic, for use in IBSS mode. The ieee80211_end_scan() function is called by ieee80211_next_scan() when the state machine has peformed a full cycle of scanning on all available radio channels. Internally, ieee80211_end_scan() will inspect the node cache associated with the interface ic for suitable access points found during scanning, and associate with one, should the parameters of the node match those of the configuration requested. The ieee80211_alloc_node() function allocates an instance of struct ieee80211_node for a node having the MAC address macaddr, and associates it with the node table nt. If the allocation is successful, the node structure is initialised by ieee80211_setup_node(); otherwise, NULL is returned. The ieee80211_dup_bss() function is similar to ieee80211_alloc_node(), but is instead used to create a node database entry for the BSSID macaddr associated with the note table nt. If the allocation is successful, the node structure is initialised by ieee80211_setup_node(); otherwise, NULL is returned. The ieee80211_find_node() function will iterate through the node table nt, searching for a node entry which matches macaddr. If the entry is found, its reference count is incremented, and a pointer to the node is returned; otherwise, NULL is returned. The ieee80211_free_allnodes() function will iterate through the node list calling ieee80211_free_node() for all the nodes in table nt. The ieee80211_iterate_nodes() function will call the user-defined callback function f for all nodes in the table nt. The callback is invoked with the with the user-supplied value arg and a pointer to the current node. SEE ALSO
ieee80211(9) HISTORY
The ieee80211 series of functions first appeared in NetBSD 1.5, and were later ported to FreeBSD 4.6. AUTHORS
This man page was written by Bruce M. Simpson <bms@FreeBSD.org> and Darron Broad <darron@kewl.org>. BSD
September 12, 2006 BSD
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy