<commit_before>
/*
 * msgqueue.h
 *
 * (C) Copyright IBM Corp. 2005
 *
 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
 * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
 * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
 *
 * You can obtain a current copy of the Eclipse Public License from
 * http://www.opensource.org/licenses/eclipse-1.0.php
 *
 * Author:     <NAME> <<EMAIL>>
 *
 * Description:
 *
 * Intra process communication support for sfcb.
 *
 */

#ifndef msgqueue_h
#define msgqueue_h

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>

#define MSG_DATA 1
#define MSG_CTL 2

#define MSG_X_HTTP_STOPPING      1
#define MSG_X_NOT_SUPPORTED      2
#define MSG_X_PROVIDER           3
#define MSG_X_INVALID_CLASS      4
#define MSG_X_INVALID_NAMESPACE  5
#define MSG_X_PROVIDER_NOT_FOUND 6
#define MSG_X_EXTENDED_CTL_MSG   7
#define MSG_X_FAILED             8
#define MSG_X_LOCAL              9
#define MSG_X_SFCB_PROVIDER      10

#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
#else
union semun {
  int             val;
  struct semid_ds *buf;
  unsigned short int *array;
  struct seminfo *__buf;
};
#endif

typedef struct _spMessageHdr {
  short           type;
  short           xtra;
  int             returnS;
  unsigned long   totalSize;
  unsigned long   segments;
  void           *provId;
} SpMessageHdr;

typedef struct _msgSegment {
  void           *data;
  unsigned        type;
  unsigned        length;
} MsgSegment;

typedef struct msgXctl {
  unsigned        length;
  unsigned        code;
  char            data[1];
} MsgXctl;

#define MSG_SEG_CHARS 1
#define MSG_SEG_OBJECTPATH 2
#define MSG_SEG_INSTANCE 3
#define MSG_SEG_CONSTCLASS 4
#define MSG_SEG_ARGS 5
#define MSG_SEG_QUALIFIER 6

typedef struct msgList {
  long            count;
  MsgSegment      list[1];
} MsgList;

typedef struct sockRequest {
  int             req;
  char            msg[60];
} SockRequest;

#define COM_RECV 0
#define COM_SEND 1
#define COM_ALL -1

typedef enum comCloseOpt {
  cRcv = 0,
  cSnd = 1,
  cAll = -1
} ComCloseOpt;

#define cRcvSocket(sp) (sp.receive)
#define cSndSocket(sp) (sp.send)

typedef struct comSockets {<commit_msg>[ 3018141 ] Removed unused data structure<commit_after>
/*
 * msgqueue.h
 *
 * (C) Copyright IBM Corp. 2005
 *
 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
 * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
 * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
 *
 * You can obtain a current copy of the Eclipse Public License from
 * http://www.opensource.org/licenses/eclipse-1.0.php
 *
 * Author:     <NAME> <<EMAIL>>
 *
 * Description:
 *
 * Intra process communication support for sfcb.
 *
 */

#ifndef msgqueue_h
#define msgqueue_h

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>

#define MSG_DATA 1
#define MSG_CTL 2

#define MSG_X_HTTP_STOPPING      1
#define MSG_X_NOT_SUPPORTED      2
#define MSG_X_PROVIDER           3
#define MSG_X_INVALID_CLASS      4
#define MSG_X_INVALID_NAMESPACE  5
#define MSG_X_PROVIDER_NOT_FOUND 6
#define MSG_X_EXTENDED_CTL_MSG   7
#define MSG_X_FAILED             8
#define MSG_X_LOCAL              9
#define MSG_X_SFCB_PROVIDER      10

#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
#else
union semun {
  int             val;
  struct semid_ds *buf;
  unsigned short int *array;
  struct seminfo *__buf;
};
#endif

typedef struct _spMessageHdr {
  short           type;
  short           xtra;
  int             returnS;
  unsigned long   totalSize;
  unsigned long   segments;
  void           *provId;
} SpMessageHdr;

typedef struct _msgSegment {
  void           *data;
  unsigned        type;
  unsigned        length;
} MsgSegment;

typedef struct msgXctl {
  unsigned        length;
  unsigned        code;
  char            data[1];
} MsgXctl;

#define MSG_SEG_CHARS 1
#define MSG_SEG_OBJECTPATH 2
#define MSG_SEG_INSTANCE 3
#define MSG_SEG_CONSTCLASS 4
#define MSG_SEG_ARGS 5
#define MSG_SEG_QUALIFIER 6

typedef struct sockRequest {
  int             req;
  char            msg[60];
} SockRequest;

#define COM_RECV 0
#define COM_SEND 1
#define COM_ALL -1

typedef enum comCloseOpt {
  cRcv = 0,
  cSnd = 1,
  cAll = -1
} ComCloseOpt;

#define cRcvSocket(sp) (sp.receive)
#define cSndSocket(sp) (sp.send)

typedef struct comSockets {
{'fraction_non_alphanumeric': 0.08425865447419988, 'fraction_numerical': 0.016546919224907468, 'mean_word_length': 2.980935875216638, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '851674', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1668, 'n_words': 461}