liblogging: clntprof-3195cooked.c File Reference

Main Page | Compound List | File List | Compound Members | File Members | Related Pages

# clntprof-3195cooked.c File Reference

Implementation of the client profile for RFC 3195 COOKED. More...

`#include <assert.h>`
`#include "config.h"`
`#include "liblogging.h"`
`#include "srAPI.h"`
`#include "beepsession.h"`
`#include "beepchannel.h"`
`#include "beepprofile.h"`
`#include "clntprof-3195cooked.h"`
`#include "namevaluetree.h"`
`#include "stringbuf.h"`
`#include "syslogmessage.h"`

## Functions
srRetVal | sbPSRCClntSendSLMG (sbChanObj *pChan, srSLMGObj *pSLMG)
| Handler to send a srSLMGObj to the remote peer.
srRetVal | sbPSRCClntSendMsg (sbChanObj *pChan, char *szLogmsg)
| Send a message to the remote peer.
srRetVal | sbPSRCClntOpenLogChan (sbChanObj *pChan)
| Handler to be called when a new channel is established.
srRetVal | sbPSRCCOnClntCloseLogChan (sbChanObj *pChan)
| Handler to be called when a channel is to be closed.

## Detailed Description

Implementation of the client profile for RFC 3195 COOKED.

The prefix for this "object" is psrr which stands for *P*rofile *S*yslog *R*eliable *Cooked*. This file works in conjunction with -3195cooked.c and shares its namespace.

Author:
  Rainer Gerhards <rgerhards@adiscon.com>

Date:
  2003-09-05 coding begun.

Copyright 2002-2003 Rainer Gerhards and Adiscon GmbH. All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of Adiscon GmbH or Rainer Gerhards nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

## Function Documentation

srRetVal sbPSRCClntOpenLogChan | ( | sbChanObj * | pChan | ) |

| Handler to be called when a new channel is established. This handler is the first to be called. So it will also create the instance's data object, at least for those profiles, that need such. There is not much to do for RFC 3195/RAW ;)

srRetVal sbPSRCClntSendSLMG | ( | sbChanObj * | pChan,
|  | srSLMGObj * | pSLMG
| ) |

| Handler to send a srSLMGObj to the remote peer. This is the preferred way to send things - with COOKED, we would otherwise need to re-parse the message just to obtain the information that the caller most probably already has...