openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

rpc.h (1233B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * Remote Procedure Call BCM Dispatch Utilities
      8  */
      9 
     10 #ifndef _BCM_INT_RPC_H
     11 #define _BCM_INT_RPC_H
     12 
     13 #ifdef  BCM_RPC_SUPPORT
     14 
     15 #include <appl/cpudb/cpudb.h>
     16 #include <bcm_int/rpc/entry.h>
     17 
     18 typedef struct bcm_rpc_sreq_s {
     19     struct bcm_rpc_sreq_s  *next;
     20     cpudb_key_t         cpu;
     21     uint8               *buf;
     22     void                *cookie;
     23     uint32              rpckey[BCM_RPC_LOOKUP_KEYLEN];
     24 } bcm_rpc_sreq_t;
     25 
     26 extern void bcm_rpc_run(bcm_rpc_sreq_t *sreq);
     27 extern uint8 *bcm_rpc_setup(uint8 dir, uint32 *key,
     28                             uint32 len, uint32 seq, uint32 arg);
     29 extern void bcm_rpc_free(uint8 *buf, void *cookie);
     30 extern int  bcm_rpc_request(int unit, uint8 *buf, int len, uint8 **rbuf,
     31                             void **cookie);
     32 extern int  bcm_rpc_reply(cpudb_key_t cpu, uint8 *buf, int len);
     33 extern int  bcm_rpc_start(void);
     34 extern int  bcm_rpc_stop(void);
     35 extern int  bcm_rpc_detach(int unit);
     36 extern int  bcm_rpc_cleanup(cpudb_key_t cpu);
     37 
     38 #endif  /* BCM_RPC_SUPPORT */
     39 #endif  /* _BCM_INT_RPC_H */