-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature request #29
Comments
Please just send us your change as a unified diff and we'll have a look at it. You can also do a pull request if that is easier for you. |
Hi
I’m not skilled enough to add another output format the right way, so I just modified an already defined output format, csv, to generate RPSL
br
/mm
…---------------------
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdlib.h>
#include "extern.h"
int
output_csv(FILE *out, struct vrp_tree *vrps, struct stats *st)
{
char buf[64];
struct vrp *v;
char tbuf[26];
struct tm *tp;
time_t t;
time(&t);
setenv("TZ", "UTC", 1);
tp = localtime(&t);
strftime(tbuf, sizeof tbuf, "%FT%TZ", tp);
RB_FOREACH(v, vrp_tree, vrps) {
ip_addr_print(&v->addr, v->afi, buf, sizeof(buf));
if( v->afi == AFI_IPV4) {
if (fprintf(out, "route: %s\norigin: AS%u\ndescr: RPKI attestation\nmnt-by: NA\ncreated: %s\nlast-modified: %s\nsource: %s\n\n", buf, v->asid,tbuf,tbuf, v->tal) < 0)
return -1;
}
else
if (fprintf(out, "route6: %s\norigin: AS%u\ndescr: RPKI attestation\nmnt-by: NA\ncreated: %s\nlast-modified: %s\nsource: %s\n\n", buf, v->asid,tbuf,tbuf, v->tal) < 0)
return -1;
}
return 0;
}
On 29 Dec 2020, at 17:44, Claudio Jeker ***@***.***> wrote:
Please just send us your change as a unified diff and we'll have a look at it. You can also do a pull request if that is easier for you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#29 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA2U6DMO725MWBGZY2QBWX3SXIBQLANCNFSM4UR4DIFQ>.
|
@job, what's your opinion about an RPSL output? |
Dear @matsm Thanks for reaching out! What exactly is the use case to generate RPSL output? Keep in mind that modern IRRd (v4.1.0 and higher) have native RPKI integration, this means there no longer is a need to generate RPSL as the IRRd "generates" this itself. Kind regards, Job |
Hi
On 6 Jan 2021, at 12:54, Job Snijders ***@***.***> wrote:
Dear @matsm <https://github.com/matsm>
Thanks for reaching out! What exactly is the use case to generate RPSL output?
Keep in mind that modern IRRd (v4.1.0 and higher) have native RPKI integration, this means there no longer is a need to generate RPSL as the IRRd "generates" this itself.
Ok, I will look into this.
br
/mm
… Kind regards,
Job
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#29 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA2U6DJ7CQINZAU6URZ3CSTSYRFNTANCNFSM4UR4DIFQ>.
|
@matsm feel free to email me at job@sobornost.net if you want to discuss in more detail what your goals are and exchange suggestions on how to achieve those! |
Hi,
I need to generate RPSL output and I have made some small modification to the file output-csv.c to do just that. I have not made any modification in the rest of the source files needed to - for example - take an additional command line option.
Is it possible to have this feature integrated into the source? Perhaps better that I apply the patch after new releases.
br
/mm
The text was updated successfully, but these errors were encountered: