Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get source ip address string before insert statement in MySQL #23

Closed
mehul-m-prajapati opened this issue Jun 1, 2016 · 2 comments
Labels

Comments

@mehul-m-prajapati
Copy link
Contributor

Hi,

I have added a new column in mysql as per my requirement.

I want to get Source IP address before Insert query is executed in MySQL.
Then, I will lookup for new column value from source IP adress. I need to append this value in Insert statement.

How to get source IP address from callback handlers ?

Regards,
Mehul

@paololucente
Copy link
Member

Hi Mehul,

You mean you have a separate lookup table, say, mapping IP addresses to host names. And upon insert of IP accounting data from pmacct, somehow trigger a lookup so to link host names to flows? Or something around these lines?

@mehul-m-prajapati
Copy link
Contributor Author

mehul-m-prajapati commented Jun 2, 2016

Hi Paololucente,

I want to lookup some id informtaion from source ip address. I have built custom API to get id from IP address.

However, I want to get source ip address string before INSERT query of MySQL. So, I can pass that string to my custom API.

I have added custom API in MY_cache_dbop function.
I am able to get source ip from db_cache data structure.

Regards,
Mehul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants