14 #include "teonet_l0_client.h"
35 char addr[ARP_TABLE_IP_SIZE];
PblMap * map
Pointer to the subscribers map.
Definition: subscribe.h:22
void teoSScrUnSubscribe(teoSScrClass *sscr, char *peer_name, uint16_t ev)
Send command to unsubscribe this host from event at remote peer.
Definition: subscribe.c:451
void teoSScrSubscription(teoSScrClass *sscr, char *peer_name, uint16_t ev, ksnet_arp_data *arp)
Remote peer subscribed to event at this host.
Definition: subscribe.c:239
struct teoSScrListData teoSScrListData
teoSScr class list or CMD_SUBSCRIBE_ANSWER data
const char data[]
Make it with: gcc -o post-callback post-callback.c -lcurl.
Definition: post-callback.c:23
int teoSScrUnSubscription(teoSScrClass *sscr, char *peer_name, uint16_t ev)
Remote peer unsubscribed from event at this host.
Definition: subscribe.c:314
void * ke
Pointer to ksnetEvMgrClass.
Definition: subscribe.h:21
int teoSScrNumberOfSubscribers(teoSScrClass *sscr)
Calculate number of subscriptions.
Definition: subscribe.c:179
teoSScrClass * teoSScrInit(void *ke)
Initialize teoSScr module.
Definition: subscribe.c:37
uint8_t cmd
Command ID (used when send data to subscriber)
Definition: subscribe.h:32
uint8_t l0_f
This is L0 client. The L0 server name added to the beginning of data.
Definition: subscribe.h:33
struct teoSScrClass teoSScrClass
File: subscribe.h Author: Kirill Scherba kirill@scherba.ru
int16_t port
L0 peer port.
Definition: subscribe.h:34
teoSScr class list or CMD_SUBSCRIBE_ANSWER data
Definition: subscribe.h:29
int teoSScrUnSubscriptionAll(teoSScrClass *sscr, char *peer_name)
Unsubscribe peer_name from all events.
Definition: subscribe.c:410
void teoSScrSend(teoSScrClass *sscr, uint16_t ev, void *data, size_t data_length, uint8_t cmd)
Send event and it data to all subscribers.
Definition: subscribe.c:58
const char * teoSScrSubscriptionList(teoSScrClass *sscr)
Show peers subscribed to this host.
Definition: subscribe.c:357
void teoSScrSubscribe(teoSScrClass *sscr, char *peer_name, uint16_t ev)
Send command to subscribe this host to event at remote peer.
Definition: subscribe.c:437
int teoSScrNumberOfEventSubscribers(teoSScrClass *sscr, uint16_t event)
Calculate number of subscribers to particular event.
Definition: subscribe.c:205
void teoSScrDestroy(teoSScrClass *sscr)
Destroy teoSScr module.
Definition: subscribe.c:463
char data[]
Remote peer name in list or data in CMD_SUBSCRIBE_ANSWER.
Definition: subscribe.h:36
char addr[ARP_TABLE_IP_SIZE]
L0 peer IP address.
Definition: subscribe.h:35
uint16_t ev
Event (used when send data to subscriber)
Definition: subscribe.h:31
File: subscribe.h Author: Kirill Scherba kirill@scherba.ru
Definition: subscribe.h:19