Sponsored Content
Top Forums Programming HPUX and Compaq problem-urgent Post 21279 by Perderabo on Tuesday 14th of May 2002 04:18:10 PM
Old 05-14-2002
1) You actually are dumping a collection of bits into a structure and then you are using the individual members. If you would do what you actually said in paragraph one, there would be no problem. Breaking the data up as it arrives and storing it into the individual members is the way to go.

2) I would hope so Smilie

3) I know. You're hardly alone. But the practice still saddens me. I'll get over it.

4) You would be better off to stop thinking like that. You don't transfer a structure from one system to another. You tranfer a collection of data that might be called a frame, or a packet, or a cell, or a datagram. The data might be stored in structures at both ends. But the data comes out of the structure and is used to assemble a packet. The packet arrives at the other end. The data gets broken up and stored back into a similiar structure. I know, you want the packet to be the structure. I know it looks attractive to do that. I know it looks like it saves a lot of effort. But this why you're having trouble now.

Suppose, for a minute, that c had nothing called a structure. How would you write the code then? For the most part, that is what you should do. That would force you to code the algorithms correctly. Then go back and use structures only to organize collections of variables. That is all that structures are intended to do.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Oracle problem with HPUX 11.0

HI all I think i can get a perfect solution for our problem here. we r using oracle 7i on hpux 11.0 as a billing server .The thing is it used to get hanged sometime and we need to unmount and need to mount the oracle DB then we need to start the oracle process.The process running in that... (6 Replies)
Discussion started by: edwin_francis
6 Replies

2. UNIX for Dummies Questions & Answers

URGENT : fsck in HPUX

Experts!!! I have an urgent solution for a problem with the HP Unix workstation. I am not able to check the file system for a particular volume. when i tried with $> fsck -o full /dev/vg00/rlvol9 Returns.. full file system check required... exiting... $> How do i recover the... (4 Replies)
Discussion started by: anent
4 Replies

3. HP-UX

HPUX Login Problem on the console

Hi Everyone, I have an HP3000 server on which I am unable to login to the server.I connected the server to my laptop thru a serial cable and I am unable to login thru any user ..when i enter my login id ..the system gets me back to the login prompt without asking me for a password. Cud u pls... (1 Reply)
Discussion started by: hunk
1 Replies

4. Filesystems, Disks and Memory

HPUX 10.20 and RAID ARENA EX3 shutdown problem

Hello, I am having a Problem with an Arena EX3 Raid on an HPUX 10.20 Workstation. Everything is working fine until I shutdown the Server and power off the Raid. Then I get a filesystem corruption on the Raid. This happens everytime. The Raid is configured as Raid Level 1. I would really... (1 Reply)
Discussion started by: nleuenbe
1 Replies

5. HP-UX

Problem with HPUX as NIS-Client

Hi all! I am running an NIS Server with Linux. Now I want to configure a HPUX-Server to use this NIS Server. I have don all the configuration stuff exactly as described in the documentation. When I run YPWHICH, it shows me the right server and domain. If I run YPCAT passwd, I'll get the... (4 Replies)
Discussion started by: pepade
4 Replies

6. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

7. HP-UX

Having problem with mounting in HPUX

Hi Gurus, I'm using HP-UX B.11.23 system. I've been having some problem in mounting a filesystem that has been defined in /etc/fstab as shown below. fstab entries: /dev/vgsap/ora10264 /oracle/PRD/102_64 vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2 /dev/vgsap/orasapreog... (2 Replies)
Discussion started by: superHonda123
2 Replies

8. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

9. HP-UX

hpux-itanium 64 bit problem for libC

i am trying to build on hpux-itanium 64 bit platform. my application needs to link to 64 bit version of the library libCsup.so This library is present in /usr/lib/hpux64/libCsup.so I am specifying the location of this library as linker flags LDFLAGS := -Wl,-N -Wl,+s... (0 Replies)
Discussion started by: skyineyes
0 Replies

10. HP-UX

Problem in Configuring kerberos Server on HPUX

Hi, I am getting this error during kerberos server setup in HPUX 11.31 : kdb_create: unknown LDAP backend error while adding master entry to the database ps -ef|grep ldap root 3905 1 0 13:11:36 ? 0:00 /opt/ldapux/bin/ldapclientd Unable to find out the meaning of this... (1 Reply)
Discussion started by: Amit Kulkarni
1 Replies
LWRES_NOOP(3)							       BIND9							     LWRES_NOOP(3)

NAME
lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free - lightweight resolver no-op message handling SYNOPSIS
#include <lwres/lwres.h> lwres_result_t lwres_nooprequest_render(lwres_context_t *ctx, lwres_nooprequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b); lwres_result_t lwres_noopresponse_render(lwres_context_t *ctx, lwres_noopresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b); lwres_result_t lwres_nooprequest_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_nooprequest_t **structp); lwres_result_t lwres_noopresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_noopresponse_t **structp); void lwres_noopresponse_free(lwres_context_t *ctx, lwres_noopresponse_t **structp); void lwres_nooprequest_free(lwres_context_t *ctx, lwres_nooprequest_t **structp); DESCRIPTION
These are low-level routines for creating and parsing lightweight resolver no-op request and response messages. The no-op message is analogous to a ping packet: a packet is sent to the resolver daemon and is simply echoed back. The opcode is intended to allow a client to determine if the server is operational or not. There are four main functions for the no-op opcode. One render function converts a no-op request structure -- lwres_nooprequest_t -- to the lighweight resolver's canonical format. It is complemented by a parse function that converts a packet in this canonical format to a no-op request structure. Another render function converts the no-op response structure -- lwres_noopresponse_t to the canonical format. This is complemented by a parse function which converts a packet in canonical format to a no-op response structure. These structures are defined in lwres/lwres.h. They are shown below. #define LWRES_OPCODE_NOOP 0x00000000U typedef struct { lwres_uint16_t datalength; unsigned char *data; } lwres_nooprequest_t; typedef struct { lwres_uint16_t datalength; unsigned char *data; } lwres_noopresponse_t; Although the structures have different types, they are identical. This is because the no-op opcode simply echos whatever data was sent: the response is therefore identical to the request. lwres_nooprequest_render() uses resolver context ctx to convert no-op request structure req to canonical format. The packet header structure pkt is initialised and transferred to buffer b. The contents of *req are then appended to the buffer in canonical format. lwres_noopresponse_render() performs the same task, except it converts a no-op response structure lwres_noopresponse_t to the lightweight resolver's canonical format. lwres_nooprequest_parse() uses context ctx to convert the contents of packet pkt to a lwres_nooprequest_t structure. Buffer b provides space to be used for storing this structure. When the function succeeds, the resulting lwres_nooprequest_t is made available through *structp. lwres_noopresponse_parse() offers the same semantics as lwres_nooprequest_parse() except it yields a lwres_noopresponse_t structure. lwres_noopresponse_free() and lwres_nooprequest_free() release the memory in resolver context ctx that was allocated to the lwres_noopresponse_t or lwres_nooprequest_t structures referenced via structp. RETURN VALUES
The no-op opcode functions lwres_nooprequest_render(), lwres_noopresponse_render() lwres_nooprequest_parse() and lwres_noopresponse_parse() all return LWRES_R_SUCCESS on success. They return LWRES_R_NOMEMORY if memory allocation fails. LWRES_R_UNEXPECTEDEND is returned if the available space in the buffer b is too small to accommodate the packet header or the lwres_nooprequest_t and lwres_noopresponse_t structures. lwres_nooprequest_parse() and lwres_noopresponse_parse() will return LWRES_R_UNEXPECTEDEND if the buffer is not empty after decoding the received packet. These functions will return LWRES_R_FAILURE if pktflags in the packet header structure lwres_lwpacket_t indicate that the packet is not a response to an earlier query. SEE ALSO
lwres_packet(3) COPYRIGHT
Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 2000, 2001 Internet Software Consortium. BIND9 Jun 30, 2000 LWRES_NOOP(3)
All times are GMT -4. The time now is 03:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy