Skip to contentSkip to conversation

Writing Queue-Modul in Pascal

DISCUSSION [email protected] 2 participants 5 messages Nov 19, 2005 – Nov 20, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi!
I am trying to write an application for the queue-target. Unfortunately all examples and source code itself are written in C++.
http://www.die.net/doc/linux/man/man3/libipq.3.html

I like to use Pascal (freepascal or so...) but I need nessesary units (called header files in C++?)

Is there any change to use Pascal?

Greetings Sven

#1 lore raw
Quoted 8 lines · [email protected] wrote:

Hi!
I am trying to write an application for the queue-target. Unfortunately all examples and source code itself are written in C++.
http://www.die.net/doc/linux/man/man3/libipq.3.html

I like to use Pascal (freepascal or so...) but I need nessesary units (called header files in C++?)

Is there any change to use Pascal?

The examples are in C, not C++. Using Pascal should be relatively straightforward if you can somehow translate the C headerfiles.

M$

#2 lore raw
Quoted 4 lines · Martijn Lievaart

The examples are in C, not C++. Using Pascal should be relatively straightforward if you can somehow translate the C headerfiles.

M$

I thought, m is an object (m->packet_id).
I take a look in these headerfiles.

#3 lore raw
Quoted 11 lines · [email protected] wrote:
Quoted 4 lines · Martijn Lievaart

The examples are in C, not C++. Using Pascal should be relatively straightforward if you can somehow translate the C headerfiles.

M$

I thought, m is an object (m->packet_id).
I take a look in these headerfiles.

Ah, no, that is C-ish for accessing a field of a struct (record) through a pointer. It is equivalent to (IIRC) to (^m).packet_id in Pascal (or was it (m^).packet_id? Well something like that).

M4

#4 lore raw
Quoted 3 lines · Martijn Lievaart

Ah, no, that is C-ish for accessing a field of a struct (record) through a pointer. It is equivalent to (IIRC) to (^m).packet_id in Pascal (or was it (m^).packet_id? Well something like that).

M4

I wanted to search the ip-packet for hex-values and then decide to drop or accept the paket.