Log4View UDP Message Structure - udp

I'm trying to send from various applications logs to Log4View by UDP (port 878), but i can't find any information of the message format on the web.
I've tried to send a simple string but it won't work at all.
Is there any information about it? I know that it is very simple task in C# with log4net, but the web is lack of information on other platforms.

To send log messages to Log4View via UDP, you have to use the xml format.
You can find more in our documentation about how to use the xml format:
http://www.log4view.com/fileadmin/user_upload/Log4ViewHelp/XML_Layout.html
Yours sincerely
Philipp Lauchner
PROSA GmbH
Development & Support

Related

How to program pcap with Objective-C and get HTTP request and response values in text format

I am working with pcap in an OS X application to understand packet analysis.
I am working with a app https://github.com/jpiccari/MacAlyzer
but I am getting only raw data but I want to differentiate every domain request into separate and clear way to read request and response value. Please guide me the way to how to develop an application with pcap.
I have tried some code but they translate data into hex format. How do I convert that data into meaningful request and response objects like Charles and Fiddler show?
MacAlyzer wasn't developed for your needs. I know because I'm the author. As already stated, Charles and Fiddler are web proxies and work entirely different (and serve different purposes).
Diving a bit deeper into your question, communication between client and server happens IP-to-IP and not domain-to-domain. Domain information is not contained in the packets at the either the IP or TCP level. Instead computers request domain-to-IP lookup information which is then stored and communication is carried out using the client and server IP addresses.
MacAlyzer, and really libpcap, don't have sophisticated packet dissection (like say Wireshark) and cannot display packet information as verbosely as other programs. Before I lost interest in the project I was planning a library that would allow much richer packet dissection and analysis, but free time became very limited.
As for adding domain information to MacAlyzer, I'll explain at a high-level since it seems you know what you're doing. To include domain information instead of IP address in the Source and Destination columns you could edit function ip_host_string() in ip.m. This function controls how the client and server addresses are displayed. Modifying it to lookup the hostname from IP address and returning the resulting string would cause the domains to be displayed instead of IP addresses.
If you come up with some nice updates, consider submitting a pull request.
Here is the food for thoughts:
http://www.binarytides.com/packet-sniffer-code-c-linux/
Anyway, you will need to use C. Therefore, check the codes of the includes, for example:
http://www.eg.bucknell.edu/~cs363/2014-spring/code/tcp.h
Here is the documentation of "pcap":
http://www-01.ibm.com/support/knowledgecenter/#!/ssw_aix_71/com.ibm.aix.basetrf1/pcap_close.htm

Sending data packets over udp

I am creating an app that acts as a remote control for a lighting console and I need to send commands to the console over UDP. The protocol that I am using has its own custom header. How do I create the data packet with header and message to send over UDP? Thanks!
If you are trying to test the protocol, without writing any code, I suggest you use WireShark.
The probably most powerful solution you can use is scapy, which is a python module that allows very advanced packet crafting and manipulation. See its documentation or search the interwebs for examples to find out how to generate arbitrary packets and transmit them.
If you can't use python for some reason, there are multiple command line tools for packet generation, one other example being nping (documentation), the brother of nmap, the popular network scanner. nping has options to generate UDP packets with arbitrary payloads, with can be specified as a hex string, for example.
There may be other options as well. It would be good to know more details like the operating system you're on or where you get your input data from, and in which format.

Best iOS Framework for Advanced network usage?

I need a network framework that can post raw data such as 0x01. or any raw data i need posted to a server. Not just a HTTP request. I can't seem to find any network frameworks like this. Also, If there are none that currently exist. How would i go about writing the sockets? I can't seem to get that down. which is why i am looking for a existing framework. Thanks for any help. I have tried using sockets but, I was unable to convert the CFArrayRef. I tried many things, But, It crashed every time i tested. So, I am running out of options but to use a prebuilt framework.
Note, I do not want to do only a request like:
POST / HTTP/1.1
Host: localhost
Content-Length: 4
0x01
No, I would like to send RAW data so, The following would be sent to the remote server through a socket.
0x01
This would not be visible raw text however, It would be converted to a data string then sent. I know how to convert most of the stuff i need to do, Its the sending and receiving the response I need the framework for or something that'd work. Any tutorials online or examples on how to do something similar that I can modify to fit to my needs would be greatly appreciated.
How do i send raw data to a socket?
Where do i find a framework like this?
Can you provide tutorials that I can modify to fit my needs?
The best framework for this is CocoaAsyncSocket. While it allows sending arbitrary data on the socket, it also provides very useful abstraction of much of the busywork of socket management. Look particularly a the GCD version that replaces the older RunLoop based code.
I've built several low-level protocols on this stack. I recommend it highly.
You can either use raw sockets or the CFStream API. I recommend the latter.

how to send a file like word via RabbitMQ

I need to be able to send files like pdf or word via RabbitMQ (I think answer might be more generic meaning not specific to RabbitMQ but any broker I am however using RabbitMQ).
Is there are way to send them as mimes or do I need to convert to base64 and then send that.
Or am I going on a tangent here :( please help.
RabbitMQ doesn't look into the body of the message, you can send anything, any binary data.

How to Read SMS/MMS in UIQ

How to Read SMS/MMS in UIQ ?
I am going to assume that you want information about how to write some C++ source code that will allow an application to receive SMS/MMS and read the content of the messages it receives.
On Symbian OS, the message store can store SMS, MMS, EMAIL...
The API of the message store is generic.
In order to write and read data to/from the message store, you'll need to familiarise yourself with the following classes : TMsvId, CMsvSession, CClientMtmRegistry, TMsvEntry and CMsvEntry.
I am obviously biased but I would advise reading the messaging chapter of http://www.quickrecipesonsymbianos.com in order to get an explanation of how the messaging store works and the sample code to use it easily.
Receiving messages, on the other hand, is more complicated.
Listening for and receiving SMS is done using the generic networking API. That's RSocketServ and RSocket. Mostly, you need to use to the right IOCTL parameters on the socket.
You can specify a specific port in order to only receive SMS that are intended for your application. Trying to receive all SMS could be an issue as the native message viewer engine and the embedded Java virtual machine PushRegistry module could both be listening for all SMS already.
You will find useful classes and constants in the following header files in your SDK:
gsmuset.h smsuaddr.h smsustrm.h gsmubuf.h gsmumsg.h.
TSmsAddr, KSMSDatagramProtocol, KSMSAddrFamily, TSmsUserDataSettings, CSmsBufferBase, CSmsPDU, RSmsSocketReadStream, RSmsSocketWriteStream and CSmsMessage are of particular interest. Asynchronously receiving an SMS is actually done using RSocket.Ioctl().
There are SMS-specific error codes whose names start with "KSmsErr"
Receiving MMS on UIQ is done through a UQI-specific API. One that you won't find on Series60 phones. This is the reason why you won't find much talk of a Symbian-generic MMS API in the litterature. You are better off going directly to the UIQ or Sony-Ericsson development communities when you have more detailled questions.
Your application shouldn't have to use RSocket to receive MMS.
Careful, once again, both the Embedded Java virtual machine PushRegistry module and the native message viewer application engine are probably already listening for all incoming MMS messages.
The interesting header files are mmsclient.h, MmsSettingsStore.h, mmsentry.h, MmsApiExtensions.h
Of particular interest are CMmsClientMtm, MmsApiExtensions, MMsvSessionObserver and MMMSMessageHandler.
Good luck.