Jump to content

AU3Xtra.dll - UDP?


warmfuzzy
 Share

Recommended Posts

Hello,

Are there plans for adding UDP send & receive in AU3Xtra.dll? I was interested in creating a (Unix) Syslog Client and a (Unix) Syslog Daemon.

Although I've found a freeware Syslog Client DLL (no source available), and a freeware Syslog Daemon windows service (no source available) that I can parse via the application event log and/or an output text file, it would be a good thing to be able to work with UDP in AU3Xtra directly so I could bypass the iterative parsing of the NT application event log to see SyslogD events that were received and handle them in the .au3 itself.

Please also see event logging via AU3Xtra.dll (I thought I'd mention it in case my question got lost in the shuffle).

Thanks & Cheers.

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

Are there plans for adding UDP send & receive in AU3Xtra.dll? I was interested in creating a (Unix) Syslog Client and a (Unix) Syslog Daemon.

Although I've found a freeware Syslog Client DLL (no source available), and a freeware Syslog Daemon windows service (no source available) that I can parse via the application event log and/or an output text file, it would be a good thing to be able to work with UDP in AU3Xtra directly so I could bypass the iterative parsing of the NT application event log to see SyslogD events that were received and handle them in the .au3 itself.

Please also see event logging via AU3Xtra.dll (I thought I'd mention it in case my question got lost in the shuffle).

Thanks & Cheers.

<{POST_SNAPBACK}>

funny for me, had the same idea, cause i want to make a syslog server with email support for my hardware firewall .... the buyable syslog server costs alot of money (if you want email support and ruledefinitions) and if you think about whats neccessary to do that, its really hard to believe, what THEY WANT TO GET :(

udp support what be great !

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Link to comment
Share on other sites

You could have seen I included in the Beta the TCP functions of Au3Xtra.dll.

I was not thinking UDP was so important but if you post a sample of what can be done with UDP support I will be glad to extend the current AutoIt functions. :(

I think Larry the TCP autoIt father will agree.

Link to comment
Share on other sites

Yea, thanks for sticking the TCP stuff in the core, I was mucho pleased when I saw that.

As an aside, with the way you guys are handling the beta/production installs, what is the easiest way for me to run the beta as primary and still have full Scite support?

I ran the updater for Scite but it still doesn't like the beta tcp functions labeling them as "undefined".

Link to comment
Share on other sites

What's UDP?  :(

<{POST_SNAPBACK}>

argl i had to make my syslog server in perl :

my customer hadnt the time to wait for it ....

but i really think it would be great, if you implement udp support in your dll larry - btw really good job at all :(

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Link to comment
Share on other sites

argl i had to make my syslog server in perl :

my customer hadnt the time to wait for it ....

but i really think it would be great, if you implement udp support in your dll larry - btw really good job at all :(

<{POST_SNAPBACK}>

Can you post a example of what can be done if we implement a UDP access? :(
Link to comment
Share on other sites

Can you post a example of what can be done if we implement a UDP access? :(

<{POST_SNAPBACK}>

ok for e.

i have a firewall with a syslog daemon, what sends textmessages to a syslog server, to generate a syslog SERVER the only thing you need is to build a udp listener on port 514. its rfc standard, so its not possible to make the wall sent data via TCP :(

there are also other things, where the udp protocol is used for, everywhere there, where its NOT neccessary, that the information is guaranted sent to the server...

i made my syslog server in perl now.

here is a good explination:

User Datagram Protocol. A communications protocol for the Internet network layer, transport layer, and session layer, which makes it possible to send a datagram message from one computer to an application running in another computer. Like TCP (Transmission Control Protocol), UDP is used with IP (the Internet Protocol). Unlike TCP, UDP is connectionless and does not guarantee reliable communication; the application itself must process any errors and check for reliable delivery.

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Link to comment
Share on other sites

ok for e.

i have a firewall with a syslog daemon, what sends textmessages to a syslog server, to generate a syslog SERVER the only thing you need is to build a udp listener on port 514. its rfc standard, so its not possible to make the wall sent data via TCP :(

there are also other things, where the udp protocol is used for, everywhere there, where its NOT neccessary, that the information is guaranted sent to the server...

i made my syslog server in perl now.

here is a good explination:

User Datagram Protocol. A communications protocol for the Internet network layer, transport layer, and session layer, which makes it possible to send a datagram message from one computer to an application running in another computer. Like TCP (Transmission Control Protocol), UDP is used with IP (the Internet Protocol). Unlike TCP, UDP is connectionless and does not guarantee reliable communication; the application itself must process any errors and check for reliable delivery.

<{POST_SNAPBACK}>

Can you post what you think Autoit UDP scripts look like in your case?

I need example to be sure of the implementation

Thanks :(

Link to comment
Share on other sites

UDP is a means of quickly sending a chunk of data from point A to point B. It's primary advantage is speed, it doesn't bother establishing a connection or anything. Now the drawback is that you aren't guaranteed a: point B ever even gets it and b: you have no way of knowing if they got it or not!!

What good is this, you ask? Well sometimes this is 'good enough' and you can live with those restrictions.

If you do need to be sure point B gets your message, use TCP/IP. Actually TCP/IP internally uses UDP to transmit, it just provides a layer of handshaking on top of UDP so if the data never gets there, its automatically resent for you until it does. Throw in all the connection handling stuff and thats how you get TCP/IP.

Now, what I would rather see than UDP, is an interface to send/receive binary information. However, this gets very tricky, especially if interspersed with string output. Or even better, build in the handling of multiple socket connections.

Finally, hopefully everyone here recognizes the current TCP code is not mission critical stuff, because its not taking multiple packets into account. Most (99%) of the time if you send a string, the packet will contain the entire string including the newline. However, there is nothing in TCP/IP that promises this, and any code relying on this will eventually have a string split across multiple packets and if you aren't taking this into account, it will get all jammed up. Also, you can have multiple strings end up in a single packet, and if you aren't looking for this case, you will miss some data as well. I did not see any code in there to account for this case either. If you need 100% mission critical communication, you will have to look elsewhere.

Link to comment
Share on other sites

Just in case this was missed, on April 20 I posted a Syslog Send with DLL. Details here

Routers (e.g. Linksys with Sveasoft or an Open Source firmware) of various shapes & sizes can send their logs to a (Unix) Syslog Daemon (e.g. so you know that you are under attack, or when your ISP connection goes down). However if you're not running a Unix server, or you want them to be parsed via a Windows server or workstation, then you need to be running a Syslog Daemon (listener on port 514, using UDP not TCP protocol).

There are a number of other uses for UDP, such as audio & video streams, and VOIP. UDP packets that don't arrive in a timely fashion are discarded (good for a/v streams), unlike TCP which retries/resends packets.

Link to comment
Share on other sites

Just in case this was missed, on April 20 I posted a Syslog Send with DLL. Details here

Routers (e.g. Linksys with Sveasoft or an Open Source firmware) of various shapes & sizes can send their logs to a (Unix) Syslog Daemon (e.g. so you know that you are under attack, or when your ISP connection goes down).  However if you're not running a Unix server, or you want them to be parsed via a Windows server or workstation, then you need to be running a Syslog Daemon (listener on port 514, using UDP not TCP protocol).

There are a number of other uses for UDP, such as audio & video streams, and VOIP.  UDP packets that don't arrive in a timely fashion are discarded (good for a/v streams), unlike TCP which retries/resends packets.

<{POST_SNAPBACK}>

I understand perfectly the need I just want somebody write the syntax derived from the TCPfunction syntax.

Can You do that?

Thanks :(

Link to comment
Share on other sites

I understand perfectly the need I just want somebody write the syntax derived from the TCPfunction syntax.

Can You do that?

Thanks :(

<{POST_SNAPBACK}>

Would love to see someone with the knowledge to give this a go. If I felt I had the knowledge myself I would try, but I don't. I've been monitoring the UDP chatter for a while though and it's unfortunate it seems to have died out a little.

I'd use this myself to send UDP control messages to some hardware I have :(

Link to comment
Share on other sites

Would love to see someone with the knowledge to give this a go. If I felt I had the knowledge myself I would try, but I don't. I've been monitoring the UDP chatter for a while though and it's unfortunate it seems to have died out a little.

I'd use this myself to send UDP control messages to some hardware I have :(

<{POST_SNAPBACK}>

If you use UDP you can be able to fulfill my requirement to have somebody write could be done in a Autoit like syntax.

Thanks to put a sample script so I can see how to add UDP to the current TCP functions. :(

Link to comment
Share on other sites

Ahh, see its really so simple I wasn't sure what you were asking for..

Create your UDP sockets with: socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP) and call bind() as you normally would.

There are no connections established with UDP, so you will never call connect() listen() or accept().

To send a chunk of data use the WinSock sendto() function. You just need to create a wrapper func to pass in the appropriate args.

To receive a chunk of data use the WinSock recvfrom() function. Again, just needs a wrapper.

Link to comment
Share on other sites

Ahh, see its really so simple I wasn't sure what you were asking for..

Create your UDP sockets with:  socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP) and call bind() as you normally would.

There are no connections established with UDP, so you will never call connect() listen() or accept().

To send a chunk of data use the WinSock sendto() function. You just need to create a wrapper func to pass in the appropriate args.

To receive a chunk of data use the WinSock recvfrom() function.  Again, just needs a wrapper.

<{POST_SNAPBACK}>

I don't know how to say that I WANT A SCRIPT which can work.

Why don't you update the TCPSend/TCPRecv examples and make it almost working replacing TCP function with UDP ones.

I can do what you say I already read MSDN on the subject but as I am not A TCP/UDP specialist I Want A REAL EXAMPLE. I hope you can help. :(

Link to comment
Share on other sites

  • 2 months later...

I am just following up on this now that the beta has UDP functionality. I would like to see a UDF for syslogging that does not include external dlls. Would anyone be interested in creating a UDF for syslog/514, or explaining how I might be able to do it?

Who else would I be?
Link to comment
Share on other sites

I'll take a jab at it, but I can't guarantee anything, as most of my UDP stuff was just trying to test the functionality :\

Edit: Set my router config to my IP address, but nothing is coming through...I'll fire up ethereal in a minute, here's the code I whipped up right quick...

Edit2: My linksys router seems to be sending standard SNMP packets :), but the script still isn't picking those up either...

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 316,(@DesktopWidth-392)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$Edit_1 = GuiCtrlCreateEdit("", 10, 10, 370, 290)

HotKeySet("{F10}", "HotKeyQuit")
UDPStartup()
$array = UDPBind('192.168.0.1', 514)
If $array = -1 Then MsgBox(0, "WSAGetLastError", @Error)

GuiSetState()

While 1
    $msg = UDPRecv($array, 100)
    If $msg <> "" Then
        GUICtrlSetData($Edit_1, GUICtrlRead($Edit_1) & @CRLF & $msg)
    EndIf
    If GUIGetMsg() = $GUI_EVENT_CLOSE Then
        Exit
    EndIf
WEnd
Exit

Func HotKeyQuit()
    Exit
EndFunc

Func OnAutoItExit()
    UDPCloseSocket($array)
    UDPShutdown()
EndFunc
Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

I am just following up on this now that the beta has UDP functionality. I would like to see a UDF for syslogging that does not include external dlls. Would anyone be interested in creating a UDF for syslog/514, or explaining how I might be able to do it?

<{POST_SNAPBACK}>

there is a thread where Jon states, that it is unclear whether the tcp/upd functions will be in the final version. http://www.autoitscript.com/forum/index.php?showtopic=13508

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

MSLx_Fanboy,

Thanks for the simple script. After running it with a current syslog message coming into my computer, I recieved all the information I needed to find a tutorial on sending syslog messages. Thanks for your help. I couldn't have done it without you.

Edited by this-is-me
Who else would I be?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...