A little C help - IBM AS400

This is a discussion on A little C help - IBM AS400 ; Hello All, Although I know this group might not be the correct place for this, I was hoping someone could help or at least point to the proper group to post this in. I am trying to get a plug-in ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: A little C help

  1. A little C help

    Hello All,
    Although I know this group might not be the correct place for this, I
    was hoping someone could help or at least point to the proper group to
    post this in.

    I am trying to get a plug-in for Apache, mod_security, to compile into a
    service program. I don't really know C at all so I'm not sure what to do
    here.

    Here are the errors I am getting:
    Definition not found for symbol 'ap_bucket_type_error'.
    Definition not found for symbol 'ap_add_input_filter_handle'.
    Definition not found for symbol 'ap_add_output_filter_handle'.
    Definition not found for symbol 'ap_hook_error_log'.

    Here is the compile command:
    CRTSRVPGM SRVPGM(JRPLIB/MOD_SECURE)
    SRCFILE(JRPLIB/QSRVSRC) SRCMBR(MOD_SECB)
    TEXT(MOD_SECURITY)
    BNDSRVPGM(QHTTPSVR/QZSRAPR
    QHTTPSVR/QZSRCORE QHTTPSVR/QZSRXMLP
    QHTTPSVR/QZSRSDBM) DETAIL(*BASIC)
    STGMDL(*INHERIT)


    I got MOD_SECURE to compile via the CRTCMOD command.

    I know these methods??? are in the http_protocol.h header file.

    OS = V5R4 - Should be the latest PTF's.

    Any help would be appreciated.

    TIA,
    James R. Perkins

  2. Re: A little C help

    Don't know much, but if you can figure out if that is a 'link time' or
    'compile time' error, the problem might just solve itself. If it a 'compile
    time' error, then you are missing a header file somewhere. (This is what I
    think is the problem.) However, if it is a 'link time' error, then you need
    to include another library in the BND list, because it is not finding code
    for those names. If they are function calls, then it is probably a 'link
    time' error.

    Hope that helps a bit.

    -Paul

    "James Perkins" wrote in message
    news:v6qdnWaonrb3fRTYnZ2dnUVZ_o-knZ2d@comcast.com...
    > Hello All,
    > Although I know this group might not be the correct place for this, I was
    > hoping someone could help or at least point to the proper group to post
    > this in.
    >
    > I am trying to get a plug-in for Apache, mod_security, to compile into a
    > service program. I don't really know C at all so I'm not sure what to do
    > here.
    >
    > Here are the errors I am getting:
    > Definition not found for symbol 'ap_bucket_type_error'.
    > Definition not found for symbol 'ap_add_input_filter_handle'.
    > Definition not found for symbol 'ap_add_output_filter_handle'.
    > Definition not found for symbol 'ap_hook_error_log'.
    >
    > Here is the compile command:
    > CRTSRVPGM SRVPGM(JRPLIB/MOD_SECURE)
    > SRCFILE(JRPLIB/QSRVSRC) SRCMBR(MOD_SECB)
    > TEXT(MOD_SECURITY)
    > BNDSRVPGM(QHTTPSVR/QZSRAPR
    > QHTTPSVR/QZSRCORE QHTTPSVR/QZSRXMLP
    > QHTTPSVR/QZSRSDBM) DETAIL(*BASIC)
    > STGMDL(*INHERIT)
    >
    > I got MOD_SECURE to compile via the CRTCMOD command.
    >
    > I know these methods??? are in the http_protocol.h header file.
    >
    > OS = V5R4 - Should be the latest PTF's.
    >
    > Any help would be appreciated.
    >
    > TIA,
    > James R. Perkins




  3. Re: A little C help


    James Perkins wrote:
    > Hello All,
    > Although I know this group might not be the correct place for this, I
    > was hoping someone could help or at least point to the proper group to
    > post this in.
    >
    > I am trying to get a plug-in for Apache, mod_security, to compile into a
    > service program. I don't really know C at all so I'm not sure what to do
    > here.
    >
    > Here are the errors I am getting:
    > Definition not found for symbol 'ap_bucket_type_error'.
    > Definition not found for symbol 'ap_add_input_filter_handle'.
    > Definition not found for symbol 'ap_add_output_filter_handle'.
    > Definition not found for symbol 'ap_hook_error_log'.
    >
    > Here is the compile command:
    > CRTSRVPGM SRVPGM(JRPLIB/MOD_SECURE)
    > SRCFILE(JRPLIB/QSRVSRC) SRCMBR(MOD_SECB)
    > TEXT(MOD_SECURITY)
    > BNDSRVPGM(QHTTPSVR/QZSRAPR
    > QHTTPSVR/QZSRCORE QHTTPSVR/QZSRXMLP
    > QHTTPSVR/QZSRSDBM) DETAIL(*BASIC)
    > STGMDL(*INHERIT)
    >
    >
    > I got MOD_SECURE to compile via the CRTCMOD command.


    that's the easy part

    >
    > I know these methods??? are in the http_protocol.h header file.


    your looking for a service program that exports those procedures. Use
    DSPSRVPGM to display the exports of a srvpgm. I did that for
    qhttpsvr/qzsrapr and saw a bunch of apr_bucket_... exports. Close to
    what you are looking for.

    You can try the BNDDIR parm of your CRTSRVPGM cmd. Look in QSYS for the
    *BNDDIR objects and try those. QC2LE is a catch all for the C runtime
    procedures. Probably will not work for you since you are looking for
    apache procs.

    Does the documentation mention a service program?

    -Steve


  4. Re: A little C help

    P. Raulerson wrote:
    > Don't know much, but if you can figure out if that is a 'link time' or
    > 'compile time' error, the problem might just solve itself. If it a 'compile
    > time' error, then you are missing a header file somewhere. (This is what I
    > think is the problem.) However, if it is a 'link time' error, then you need
    > to include another library in the BND list, because it is not finding code
    > for those names. If they are function calls, then it is probably a 'link
    > time' error.
    >
    > Hope that helps a bit.
    >
    > -Paul
    >
    > "James Perkins" wrote in message
    > news:v6qdnWaonrb3fRTYnZ2dnUVZ_o-knZ2d@comcast.com...
    >> Hello All,
    >> Although I know this group might not be the correct place for this, I was
    >> hoping someone could help or at least point to the proper group to post
    >> this in.
    >>
    >> I am trying to get a plug-in for Apache, mod_security, to compile into a
    >> service program. I don't really know C at all so I'm not sure what to do
    >> here.
    >>
    >> Here are the errors I am getting:
    >> Definition not found for symbol 'ap_bucket_type_error'.
    >> Definition not found for symbol 'ap_add_input_filter_handle'.
    >> Definition not found for symbol 'ap_add_output_filter_handle'.
    >> Definition not found for symbol 'ap_hook_error_log'.
    >>
    >> Here is the compile command:
    >> CRTSRVPGM SRVPGM(JRPLIB/MOD_SECURE)
    >> SRCFILE(JRPLIB/QSRVSRC) SRCMBR(MOD_SECB)
    >> TEXT(MOD_SECURITY)
    >> BNDSRVPGM(QHTTPSVR/QZSRAPR
    >> QHTTPSVR/QZSRCORE QHTTPSVR/QZSRXMLP
    >> QHTTPSVR/QZSRSDBM) DETAIL(*BASIC)
    >> STGMDL(*INHERIT)
    >>
    >> I got MOD_SECURE to compile via the CRTCMOD command.
    >>
    >> I know these methods??? are in the http_protocol.h header file.
    >>
    >> OS = V5R4 - Should be the latest PTF's.
    >>
    >> Any help would be appreciated.
    >>
    >> TIA,
    >> James R. Perkins

    >
    >


    Thanks Paul. I will take a look into this. I'm not really sure where the
    problem is happening.

    Thanks,
    James R. Perkins

  5. Re: A little C help

    Steve Richter wrote:
    > James Perkins wrote:
    >> Hello All,
    >> Although I know this group might not be the correct place for this, I
    >> was hoping someone could help or at least point to the proper group to
    >> post this in.
    >>
    >> I am trying to get a plug-in for Apache, mod_security, to compile into a
    >> service program. I don't really know C at all so I'm not sure what to do
    >> here.
    >>
    >> Here are the errors I am getting:
    >> Definition not found for symbol 'ap_bucket_type_error'.
    >> Definition not found for symbol 'ap_add_input_filter_handle'.
    >> Definition not found for symbol 'ap_add_output_filter_handle'.
    >> Definition not found for symbol 'ap_hook_error_log'.
    >>
    >> Here is the compile command:
    >> CRTSRVPGM SRVPGM(JRPLIB/MOD_SECURE)
    >> SRCFILE(JRPLIB/QSRVSRC) SRCMBR(MOD_SECB)
    >> TEXT(MOD_SECURITY)
    >> BNDSRVPGM(QHTTPSVR/QZSRAPR
    >> QHTTPSVR/QZSRCORE QHTTPSVR/QZSRXMLP
    >> QHTTPSVR/QZSRSDBM) DETAIL(*BASIC)
    >> STGMDL(*INHERIT)
    >>
    >>
    >> I got MOD_SECURE to compile via the CRTCMOD command.

    >
    > that's the easy part
    >
    >> I know these methods??? are in the http_protocol.h header file.

    >
    > your looking for a service program that exports those procedures. Use
    > DSPSRVPGM to display the exports of a srvpgm. I did that for
    > qhttpsvr/qzsrapr and saw a bunch of apr_bucket_... exports. Close to
    > what you are looking for.
    >
    > You can try the BNDDIR parm of your CRTSRVPGM cmd. Look in QSYS for the
    > *BNDDIR objects and try those. QC2LE is a catch all for the C runtime
    > procedures. Probably will not work for you since you are looking for
    > apache procs.
    >
    > Does the documentation mention a service program?
    >
    > -Steve
    >


    Thanks Steve. The only mod_security documentation is not for the iSeries
    and the Apache plugin documentation I found on the IBM site just said I
    had to have a minimum of the 4 service programs I am binding.

    I will look at the service programs and binding directories in QHTTPSVR.

    Thanks,
    James R. Perkins

+ Reply to Thread