Sponsored Content
Full Discussion: Segmentation Fault
Top Forums UNIX for Dummies Questions & Answers Segmentation Fault Post 302071440 by amro1 on Wednesday 19th of April 2006 01:59:58 PM
Old 04-19-2006
Let me guess

are you counting from 1 to 5 or from 0 to 4 ? Smilie
 

10 More Discussions You Might Find Interesting

1. Programming

Hi! segmentation fault

I have written a program which takes a directory as command line arguments and displays all the dir and files in it. I don't know why I have a problem with the /etc directory.It displays all the directories and files untill it reaches a sub directory called peers which is in /etc/ppp/peers.the... (4 Replies)
Discussion started by: vijlak
4 Replies

2. Programming

segmentation fault

ive written my code in C for implementation of a simple lexical analyser using singly linked list hence am making use of dynamic allocation,but when run in linux it gives a segmentation fault is it cause of the malloc function that ive made use of????any suggestions as to what i could do??? thank... (8 Replies)
Discussion started by: rockgal
8 Replies

3. AIX

Segmentation fault

Hi , During execution a backup binary i get following error "Program error 11 (Segmentation fault), saving core file in '/usr/datatools" Riyaz (2 Replies)
Discussion started by: rshaikh
2 Replies

4. Programming

Why not a segmentation fault??

Hi, Why I don't receive a segmentation fault in the following sample. int main(void) { char buff; sprintf(buff,"Hello world"); printf("%s\n",buff); } If I define a buffer of 10 elements and I'm trying to put inside it twelve elements, Should I receive a sigsev... (22 Replies)
Discussion started by: lagigliaivan
22 Replies

5. UNIX for Dummies Questions & Answers

Segmentation Fault

Hi, While comparing primary key data of two tables thr bteq script I am getting this Error. This script is a shell script. *** Error: The following error was encountered on the output file. Script.sh: 3043492 Segmentation fault(coredump) Please let me know how to get through it. ... (5 Replies)
Discussion started by: monika
5 Replies

6. Programming

segmentation fault

Hi, I am having this segmentation fault not in the following program, bt. in my lab program . My lab program is horrible long so cannot post it here bt. I am using the following logic in my program which is giving the segmentation fault. Bt. if I run this sample program as it is it dosen't give... (3 Replies)
Discussion started by: mind@work
3 Replies

7. Programming

Using gdb, ignore beginning segmentation fault until reproduce environment segmentation fault

I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this : i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies

8. Homework & Coursework Questions

Segmentation Fault

this is a network programming code to run a rock paper scissors in a client and server. I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault. -the segmentation fault is fixed Current problem -Also... (3 Replies)
Discussion started by: femchi
3 Replies

9. Programming

Segmentation fault

I keep getting this fault on a lot of the codes I write, I'm not exactly sure why so I'd really appreciate it if someone could explain the idea to me. For example this code #include <stdio.h> main() { unsigned long a=0; unsigned long b=0; int z; { printf("Enter two... (2 Replies)
Discussion started by: sizzler786
2 Replies

10. Programming

C. To segmentation fault or not to segmentation fault, that is the question.

Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1... I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one. Below are two very condensed snippets of which I have added the results inside the each code section. IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
sip_enable_counters(3SIP)			   Session Initiation Protocol Library Functions			 sip_enable_counters(3SIP)

NAME
sip_enable_counters, sip_disable_counters, sip_get_counter_value - counter operations SYNOPSIS
cc [ flag... ] file... -lsip [ library... ] #include <sip.h> int sip_enable_counters(int counter_group); int sip_disable_counters(int counter_group); int sip_get_counter_value(int group, int counter, void *counterval, size_t counterlen); DESCRIPTION
The sip_enable_counters() function enables the measurement and counting of the selected counter group. The only allowed value for the counter_group is SIP_TRAFFIC_COUNTERS, which is defined in <sip.h>. Once enabled, the SIP stack starts measuring end-to-end SIP traffic. The SIP stack keeps track of: o the number of SIP requests sent and received (broken down by methods), o the number of SIP responses sent and received (broken down by response codes), and o the number of bytes sent and received. The following counters are defined in <sip.h> for the SIP_TRAFFIC_COUNTERS group. These counter values are retrieved using the sip_get_counter_value() function. SIP_TOTAL_BYTES_RCVD SIP_TOTAL_BYTES_SENT SIP_TOTAL_REQ_RCVD SIP_TOTAL_REQ_SENT SIP_TOTAL_RESP_RCVD SIP_TOTAL_RESP_SENT SIP_ACK_REQ_RCVD SIP_ACK_REQ_SENT SIP_BYE_REQ_RCVD SIP_BYE_REQ_SENT SIP_CANCEL_REQ_RCVD SIP_CANCEL_REQ_SENT SIP_INFO_REQ_RCVD SIP_INFO_REQ_SENT SIP_INVITE_REQ_RCVD SIP_INVITE_REQ_SENT SIP_NOTIFY_REQ_RCVD SIP_NOTIFY_REQ_SENT SIP_OPTIONS_REQ_RCVD SIP_OPTIONS_REQ_SENT SIP_PRACK_REQ_RCVD SIP_PRACK_REQ_SENT SIP_REFER_REQ_RCVD SIP_REFER_REQ_SENT SIP_REGISTER_REQ_RCVD SIP_REGISTER_REQ_SENT SIP_SUBSCRIBE_REQ_RCVD SIP_SUBSCRIBE_REQ_SENT SIP_UPDATE_REQ_RCVD SIP_UPDATE_REQ_SENT SIP_1XX_RESP_RCVD SIP_1XX_RESP_SENT SIP_2XX_RESP_RCVD SIP_2XX_RESP_SENT SIP_3XX_RESP_RCVD SIP_3XX_RESP_SENT SIP_4XX_RESP_RCVD SIP_4XX_RESP_SENT SIP_5XX_RESP_RCVD SIP_5XX_RESP_SENT SIP_6XX_RESP_RCVD SIP_6xx_RESP_SENT SIP_COUNTER_START_TIME /* records time when counting was enabled */ SIP_COUNTER_STOP_TIME /* records time when counting was disabled */ All of the above counters are defined to be uint64_t, except for SIP_COUNTER_START_TIME and SIP_COUNTER_STOP_TIME, which are defined to be time_t. The sip_disable_counters() function disables measurement and counting for the specified counter_group. When disabled, the counter values are not reset and are retained until the measurement is enabled again. Calling sip_enable_counters() again would reset all counter values to zero and counting would start afresh. The sip_get_counter_value() function retrieves the value of the specified counter within the specified counter group. The value is copied to the user provided buffer, counterval, of length counterlen. For example, after the following call, invite_rcvd would have the correct value. uint64_t invite_rcvd; sip_get_counter_value(SIP_TRAFFIC_COUNTERS, SIP_INVITE_REQ_RCVD, &invite_rcvd, sizeof (uint64_t)); RETURN VALUES
Upon successful completion, sip_enable_counters() and sip_disable_counters() return 0. They will return EINVAL if an incorrect group is specified. Upon successful completion, sip_get_counter_value() returns 0. It returns EINVAL if an incorrect counter name or counter size is speci- fied, or if counterval is NULL. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.11 11 Jan 2008 sip_enable_counters(3SIP)
All times are GMT -4. The time now is 07:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy