What is the format for the headers and message body of a TIBCO-RV packet? - c

I need to decode a packet sent using TIBCO-RV and pull fields out of the header and skip over the message body. I have not been able to any examples or documentation. Does anybody know of any open source applications that might do this or if there is a Wireshark dissector out there somewhere?

Maybe you should try applying for a license and getting the official documentation. According to Wikipedia:
TIBCO provides messaging APIs in C,
C++, Java, Visual BASIC , Perl and
.NET to receive data feeds on MS Excel
spreadsheets and other applications of
choice.
Failing that, you could perhaps dive into the TIBCO:RV Perl module.

The methods which TibcoRV implements reliable mutli-cast are propriety, but one would assume easy to reverse engineer. I don't believe any of the official documentation goes into detail on the packet level detail. It's quite easy to get the data out if you have the API.
Several things come to mind:
Is the client on your machine running? This is required in order to create the multicast subscription (unless you are using broadcast mode). Otherwise, you need to have some client subscribe to the multicast channel, or your switch shouldn't forward the traffic.
Generally, you will have a single rrd running locally. You have TCP traffic between the RRD and your app. You can use an app like socketsniff to view the traffic between the two.

Related

Stomp protocol in Codename One

I don’t feel comfortable using WebSocket with Codename One and Spring Boot. Maybe my “error” was the implementation of one my own communication protocol over websocket, featuring ack and other hard to implements things. My protocol have issues that I wasn’t able to fix... I spent a lot of time creating it, but there are too much complexities for me.
Today I discovered that I tried to reinvent the wheel... since there are protocols over websocket like STUMP:
https://www.toptal.com/java/stomp-spring-boot-websocket
STOMP is a simple text-based messaging protocol that was initially created for scripting languages such as Ruby, Python, and Perl to connect to enterprise message brokers. Thanks to STOMP, clients and brokers developed in different languages can send and receive messages to and from each other. The WebSocket protocol is sometimes called TCP for Web. Analogically, STOMP is called HTTP for Web. It defines a handful of frame types that are mapped onto WebSockets frames, e.g., CONNECT, SUBSCRIBE, UNSUBSCRIBE, ACK, or SEND. On one hand, these commands are very handy to manage communication while, on the other, they allow us to implement solutions with more sophisticated features like message acknowledgment.
Is there any Stomp implementation for Codename One? Or the implementation of any other protocol over websocket? Thank you
I'm afraid not at this time. I also tried looking for implementations in Java but couldn't find any. It would actually be really nice if we had something like that.
I found an implementation for Android but I didn't get the chance to look at the complexity of porting it to Codename One.

Sending smtp email from microcontroller

This may not be in the right location, so tell me and I'll move it.
I am a recent EE grad and I was hired to build a system that exists on a SoC with a simple 32-bit processor. The system basically monitors several external devices and performs some DSP on it, and then is supposed to send the results using a WiFi device (in my case I have the ESP8266 using UDP) to an email server for logging/notification.
I have been trying to find a library that I can use, but my uC can only program in C and I have it set up for UDP, and everything is in C++ using some other protocol, or something else completely.
I am great at DSP, decent at SoC's and uC's, but when it come to this email server communication thing I am at a loss.
I have successfully configured everything for the sensors, the datapath, the DSP, and connected the system to my WiFi via UDP, but I have yet to figure out how to send data to any servers.
Could someone help me understand how I should go about this?
I have looked into some simple SMTP commands such as HELO, MAIL, RCPT, DATA, etc. but I cannot understand how I actually should implement them in my code.
When I send out the WiFi data via UDP what type of data do I send and how do I format it? Do I need to send any other kind of flags? How should I expect the response? I also know the data has to be transformed into base 64 which is confusing me further.
I am also not super familiar with UDP to begin with, I have been using libraries that are part of the SoC's default library to connect to my WiFi.
I know these may either seem like obvious or stupid questions but it is were I no longer have any knowledge, and everything I find online doesn't make sense, or doesn't attempt to explain it, just gives a pre-made solution
I have found the RFC2821 but it doesn't get any clearer.
I know that's a lot but any help at all would be a lifesaver!
Since you are asking this question, I'm assuming that you are not booting and running an OS suitable for micro-controllers such as an embedded variant of Linux or such. If you were, you would simply be able to take advantage of possibly built in applications or other existing code.
But you don't mention having written an Ethernet stack, so are you using some other library or operating environment which might have some of the functionality needed for an implementation of SMTP?
If you don't and really do need to write your own SMTP client to run directly on the processor you are using, then you should be able to find plenty of examples of source code for this. A quick google search of How To Write an SMTP client showed a few articles with some example code. One article seems to be an exact hit, but you need to look at it further.
However, I would highly suggest just sitting down with a telnet client and connect to an SMTP server you are allowed to use and try the commands you need to just send a message. If you only need to send text, you don't need to get involved in MIME encoding or anything like that.

Implementing a 9p server

I am looking to develop a C implementation of a 9p file server on a Linux machine. There isn't enough documentation in the internet about 9p and I am not very experienced with implementing servers. My general design is as follows:
Use UNIX sockets to listen to incoming 9p messages.
Decode the 9p message and spawn a new thread to perform the required task.
Reply to the client with the appropriate 9p reply message.
The server would just live in the user space and it will translate the 9p messages into a UNIX call.
Do you see any problems or have any recommendations regarding the proposed design? Are there any documentations that you can refer me to that will help me? How do you think I should debug my server and make sure it is working correctly.
Consider libixp (MIT license).
I've played around with wmii and use it in everyday work. libixp was part of wmii (in the earliest releases) and now it is an independent project. Check wmii's early versions to get a good starting point or dive directly into libixp.
To debug your server just mount it with 9PFUSE(4) with parameter −D to print each FUSE and 9P message.

Web based NX client?

But I can't seem to find much about how the NX protocol actually works. I have heard it does something with sending X11 commands. But does this mean that the listening clients need to have an x server to run the actual commands and display them?
Basically, I am trying to figure out if it is possible to write an NX client for a web browser, because it sounds interesting to me. Thoughts?
Yes. NX is essentially compressed X-Window protocol.
It's not a spec, but here is a general introduction to how it works: http://www.nomachine.com/documents/NX-XProtocolCompression.php
The client doesn't need to be an X-server, but it will probably need to be able to handle at least some subset of the X protocol.
If you are going to create an web based NX client, make sure you look at noVNC which is a web based VNC/RFB client. Better yet, fork noVNC and add NX support. That way you don't have to waste time on input, events positioning, networking, etc.
Disclaimer: I am the creator of noVNC. Implementing other remote desktop protocols (NX, RDP, Spice) is on my long term todo list (part of the reason for the name). If you're serious, contact me via github and I can give you some direction/thoughts and put you in touch with somebody else who has also expressed interest.

HTML5 Web socket Handshaking

I'm sort of new to web programming, but I wanted to write a HTML interface for a embedded device (coded in C) that I am developing. I've already implemented a stream server (a la beej's socket server example) and a java client, but I'm interested in implementing a HTML5 Socket interface instead.
I am having some trouble with the handshaking (in so much as the server accepts the connection but the web page does not), and was wondering if there was a specification available somewhere on line. The w3c spec seems to only describe the API (as far as I can tell) and not the details of the handshake. I'm not looking for a fully written example (I can do that!) just a reference for the handshaking that is better than the Wikipedia entry (or an explanation of why that entry should be enough to fully understand the spec).
If anyone could help me get it up and running I will happily package it all in a library and demo and put it up on google code.
Thanks... and please let me know if you need more info to help answer the quesiton!
It looks like this is the specifiction here. I'm not much of a web prgrammer myself either. However, based on my limited understanding, I'm curious about whether you really need to implement WebSockets. Could you just using a series of HTTP messages instead?
Did you check your code against existing servers :
http://www.codeproject.com/KB/webservices/c_sharp_web_socket_server.aspx?msg=3364691 ?
with updated to last websocket specification here :
http://nugget.codeplex.com/
Another one here :
or http://superwebsocket.codeplex.com/
Not much difference betwee c# eand C in this case...

Resources