00001 /** 00002 * @file ccnr_internal_client.h 00003 * 00004 * Part of ccnr - CCNx Repository Daemon. 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (C) 2011 Palo Alto Research Center, Inc. 00010 * 00011 * This work is free software; you can redistribute it and/or modify it under 00012 * the terms of the GNU General Public License version 2 as published by the 00013 * Free Software Foundation. 00014 * This work is distributed in the hope that it will be useful, but WITHOUT ANY 00015 * WARRANTY; without even the implied warranty of MERCHANTABILITY or 00016 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00017 * for more details. You should have received a copy of the GNU General Public 00018 * License along with this program; if not, write to the 00019 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef CCNR_INTERNAL_DEFINED 00024 #define CCNR_INTERNAL_DEFINED 00025 00026 #include "ccnr_private.h" 00027 00028 void ccnr_internal_client_stop(struct ccnr_handle *ccnr); 00029 int ccnr_internal_client_start(struct ccnr_handle *ccnr); 00030 void ccnr_face_status_change(struct ccnr_handle *ccnr,unsigned filedesc); 00031 int ccnr_init_repo_keystore(struct ccnr_handle *ccnr, struct ccn *ccn); 00032 00033 void ccnr_direct_client_stop(struct ccnr_handle *ccnr); 00034 int ccnr_direct_client_start(struct ccnr_handle *ccnr); 00035 00036 /** 00037 * Local interpretation of selfp->intdata 00038 */ 00039 #define MORECOMPS_MASK 0x007F 00040 #define MUST_VERIFY 0x0080 00041 #define MUST_VERIFY1 (MUST_VERIFY + 1) 00042 #define OPER_MASK 0xFF00 00043 #define OP_PING 0x0000 00044 #define OP_NEWFACE 0x0200 00045 #define OP_DESTROYFACE 0x0300 00046 #define OP_PREFIXREG 0x0400 00047 #define OP_SELFREG 0x0500 00048 #define OP_UNREG 0x0600 00049 #define OP_NOTICE 0x0700 00050 #define OP_SERVICE 0x0800 00051 void ccnr_uri_listen(struct ccnr_handle *ccnr, struct ccn *ccn, const char *uri, 00052 ccn_handler p, intptr_t intdata); 00053 enum ccn_upcall_res ccnr_answer_req(struct ccn_closure *selfp, 00054 enum ccn_upcall_kind kind, 00055 struct ccn_upcall_info *info); 00056 #endif